Title: [259482] trunk/Source
- Revision
- 259482
- Author
- [email protected]
- Date
- 2020-04-03 12:25:25 -0700 (Fri, 03 Apr 2020)
Log Message
Fix bugs related to VideoTextureCopierCV and ANGLE roll script
https://bugs.webkit.org/show_bug.cgi?id=209943
Patch by Kenneth Russell <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (259481 => 259482)
--- trunk/Source/ThirdParty/ANGLE/ChangeLog 2020-04-03 18:40:05 UTC (rev 259481)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2020-04-03 19:25:25 UTC (rev 259482)
@@ -1,3 +1,16 @@
+2020-04-03 Kenneth Russell <[email protected]>
+
+ Fix bugs related to VideoTextureCopierCV and ANGLE roll script
+ https://bugs.webkit.org/show_bug.cgi?id=209943
+
+ Reviewed by Dean Jackson.
+
+ 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:
+
2020-04-03 Keith Rollin <[email protected]>
Do not link with OpenGL on Apple platforms
Modified: trunk/Source/ThirdParty/ANGLE/update-angle.sh (259481 => 259482)
--- trunk/Source/ThirdParty/ANGLE/update-angle.sh 2020-04-03 18:40:05 UTC (rev 259481)
+++ trunk/Source/ThirdParty/ANGLE/update-angle.sh 2020-04-03 19:25:25 UTC (rev 259482)
@@ -62,6 +62,9 @@
echo "$COMMIT_HASH"
echo ""
+echo "Generating commit.h"
+./src/commit_id.py gen commit.h.TEMP
+
echo "Applying WebKit's local ANGLE changes to the old ANGLE version."
git checkout -B downstream-changes "$PREVIOUS_COMMIT_HASH"
pushd .. &> /dev/null
@@ -68,9 +71,10 @@
git checkout HEAD -- ANGLE
popd &> /dev/null
-echo "Copying src/commit.h to src/id/commit.h"
+echo "Copying commit.h to src/id/commit.h"
mkdir -p src/id
-git show origin/master:src/commit.h > src/id/commit.h
+cp commit.h.TEMP src/id/commit.h
+rm commit.h.TEMP
echo "Updating ANGLE.plist commit hashes."
sed -i.bak -e "s/\([^a-z0-9]\)[a-z0-9]\{40\}\([^a-z0-9]\)/\1$COMMIT_HASH\2/g" ANGLE.plist
Modified: trunk/Source/WebCore/ChangeLog (259481 => 259482)
--- trunk/Source/WebCore/ChangeLog 2020-04-03 18:40:05 UTC (rev 259481)
+++ trunk/Source/WebCore/ChangeLog 2020-04-03 19:25:25 UTC (rev 259482)
@@ -1,3 +1,29 @@
+2020-04-03 Kenneth Russell <[email protected]>
+
+ Fix bugs related to VideoTextureCopierCV and ANGLE roll script
+ https://bugs.webkit.org/show_bug.cgi?id=209943
+
+ Reviewed by Dean Jackson.
+
+ 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):
+
2020-04-03 Eric Carlson <[email protected]>
Filter some capture device names
Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (259481 => 259482)
--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm 2020-04-03 18:40:05 UTC (rev 259481)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm 2020-04-03 19:25:25 UTC (rev 259482)
@@ -345,8 +345,15 @@
eglContextAttributes.append(EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE);
eglContextAttributes.append(EGL_FALSE);
}
- eglContextAttributes.append(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE);
- eglContextAttributes.append(EGL_TRUE);
+ if (!sharedContext) {
+ // The shared context is only non-null when creating a context
+ // on behalf of the VideoTextureCopier. WebGL-specific rendering
+ // feedback loop validation does not work in multi-context
+ // scenarios, and must be disabled for the VideoTextureCopier's
+ // context.
+ eglContextAttributes.append(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE);
+ eglContextAttributes.append(EGL_TRUE);
+ }
// WebGL requires that all resources are cleared at creation.
eglContextAttributes.append(EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE);
eglContextAttributes.append(EGL_TRUE);
Modified: trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (259481 => 259482)
--- trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2020-04-03 18:40:05 UTC (rev 259481)
+++ trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2020-04-03 19:25:25 UTC (rev 259482)
@@ -379,7 +379,7 @@
VideoTextureCopierCV::VideoTextureCopierCV(GraphicsContextGLOpenGL& context)
: m_sharedContext(context)
, m_context(GraphicsContextGLOpenGL::createShared(context))
- , m_framebuffer(context.createFramebuffer())
+ , m_framebuffer(m_context->createFramebuffer())
{
}
@@ -386,11 +386,11 @@
VideoTextureCopierCV::~VideoTextureCopierCV()
{
if (m_vertexBuffer)
- m_context->deleteProgram(m_vertexBuffer);
+ m_context->deleteBuffer(m_vertexBuffer);
if (m_program)
m_context->deleteProgram(m_program);
if (m_yuvVertexBuffer)
- m_context->deleteProgram(m_yuvVertexBuffer);
+ m_context->deleteBuffer(m_yuvVertexBuffer);
if (m_yuvProgram)
m_context->deleteProgram(m_yuvProgram);
m_context->deleteFramebuffer(m_framebuffer);
@@ -847,6 +847,7 @@
LOG(WebGL, "VideoTextureCopierCV::copyVideoTextureToPlatformTexture(%p) - Unable to create framebuffer for outputTexture.", this);
return false;
}
+ m_context->bindTexture(GraphicsContextGL::TEXTURE_2D, 0);
m_context->useProgram(m_yuvProgram);
m_context->viewport(0, 0, width, height);
@@ -1026,6 +1027,7 @@
LOG(WebGL, "VideoTextureCopierCV::copyVideoTextureToPlatformTexture(%p) - Unable to create framebuffer for outputTexture.", this);
return false;
}
+ m_context->bindTexture(GraphicsContextGL::TEXTURE_2D, 0);
m_context->useProgram(m_program);
m_context->viewport(0, 0, width, height);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes