Changeset 259482 in webkit


Ignore:
Timestamp:
Apr 3, 2020 12:25:25 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Fix bugs related to VideoTextureCopierCV and ANGLE roll script
https://bugs.webkit.org/show_bug.cgi?id=209943

Patch by Kenneth Russell <kbr@chromium.org> on 2020-04-03
Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

Update the update-angle.sh script to take into account the new
procedure for generating ANGLE's commit ID header file. This
enables ANGLE rolls into WebKit again.

  • update-angle.sh:

Source/WebCore:

Fixed longstanding preexisting bugs related to creation and
deletion of OpenGL objects inside VideoTextureCopierCV, including
in which context its internal framebuffer was created. Unbind the
output texture after hooking it up to the framebuffer to avoid any
appearance of rendering feedback loops.

Stop setting the WebGL compatibility context creation attribute
for VideoTextureCopier's context.

Covered by preexisting layout tests.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

  • platform/graphics/cv/VideoTextureCopierCV.cpp:

(WebCore::VideoTextureCopierCV::VideoTextureCopierCV):
(WebCore::VideoTextureCopierCV::~VideoTextureCopierCV):
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r259475 r259482  
     12020-04-03  Kenneth Russell  <kbr@chromium.org>
     2
     3        Fix bugs related to VideoTextureCopierCV and ANGLE roll script
     4        https://bugs.webkit.org/show_bug.cgi?id=209943
     5
     6        Reviewed by Dean Jackson.
     7
     8        Update the update-angle.sh script to take into account the new
     9        procedure for generating ANGLE's commit ID header file. This
     10        enables ANGLE rolls into WebKit again.
     11
     12        * update-angle.sh:
     13
    1142020-04-03  Keith Rollin  <krollin@apple.com>
    215
  • trunk/Source/ThirdParty/ANGLE/update-angle.sh

    r255782 r259482  
    6363echo ""
    6464
     65echo "Generating commit.h"
     66./src/commit_id.py gen commit.h.TEMP
     67
    6568echo "Applying WebKit's local ANGLE changes to the old ANGLE version."
    6669git checkout -B downstream-changes "$PREVIOUS_COMMIT_HASH"
     
    6972popd &> /dev/null
    7073
    71 echo "Copying src/commit.h to src/id/commit.h"
     74echo "Copying commit.h to src/id/commit.h"
    7275mkdir -p src/id
    73 git show origin/master:src/commit.h > src/id/commit.h
     76cp commit.h.TEMP src/id/commit.h
     77rm commit.h.TEMP
    7478
    7579echo "Updating ANGLE.plist commit hashes."
  • trunk/Source/WebCore/ChangeLog

    r259477 r259482  
     12020-04-03  Kenneth Russell  <kbr@chromium.org>
     2
     3        Fix bugs related to VideoTextureCopierCV and ANGLE roll script
     4        https://bugs.webkit.org/show_bug.cgi?id=209943
     5
     6        Reviewed by Dean Jackson.
     7
     8        Fixed longstanding preexisting bugs related to creation and
     9        deletion of OpenGL objects inside VideoTextureCopierCV, including
     10        in which context its internal framebuffer was created. Unbind the
     11        output texture after hooking it up to the framebuffer to avoid any
     12        appearance of rendering feedback loops.
     13
     14        Stop setting the WebGL compatibility context creation attribute
     15        for VideoTextureCopier's context.
     16
     17        Covered by preexisting layout tests.
     18
     19        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
     20        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
     21        * platform/graphics/cv/VideoTextureCopierCV.cpp:
     22        (WebCore::VideoTextureCopierCV::VideoTextureCopierCV):
     23        (WebCore::VideoTextureCopierCV::~VideoTextureCopierCV):
     24        (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
     25        (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
     26
    1272020-04-03  Eric Carlson  <eric.carlson@apple.com>
    228
  • trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm

    r259139 r259482  
    346346        eglContextAttributes.append(EGL_FALSE);
    347347    }
    348     eglContextAttributes.append(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE);
    349     eglContextAttributes.append(EGL_TRUE);
     348    if (!sharedContext) {
     349        // The shared context is only non-null when creating a context
     350        // on behalf of the VideoTextureCopier. WebGL-specific rendering
     351        // feedback loop validation does not work in multi-context
     352        // scenarios, and must be disabled for the VideoTextureCopier's
     353        // context.
     354        eglContextAttributes.append(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE);
     355        eglContextAttributes.append(EGL_TRUE);
     356    }
    350357    // WebGL requires that all resources are cleared at creation.
    351358    eglContextAttributes.append(EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE);
  • trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp

    r254214 r259482  
    380380    : m_sharedContext(context)
    381381    , m_context(GraphicsContextGLOpenGL::createShared(context))
    382     , m_framebuffer(context.createFramebuffer())
     382    , m_framebuffer(m_context->createFramebuffer())
    383383{
    384384}
     
    387387{
    388388    if (m_vertexBuffer)
    389         m_context->deleteProgram(m_vertexBuffer);
     389        m_context->deleteBuffer(m_vertexBuffer);
    390390    if (m_program)
    391391        m_context->deleteProgram(m_program);
    392392    if (m_yuvVertexBuffer)
    393         m_context->deleteProgram(m_yuvVertexBuffer);
     393        m_context->deleteBuffer(m_yuvVertexBuffer);
    394394    if (m_yuvProgram)
    395395        m_context->deleteProgram(m_yuvProgram);
     
    848848        return false;
    849849    }
     850    m_context->bindTexture(GraphicsContextGL::TEXTURE_2D, 0);
    850851
    851852    m_context->useProgram(m_yuvProgram);
     
    10271028        return false;
    10281029    }
     1030    m_context->bindTexture(GraphicsContextGL::TEXTURE_2D, 0);
    10291031
    10301032    m_context->useProgram(m_program);
Note: See TracChangeset for help on using the changeset viewer.