Title: [113481] trunk/Source/WebCore
Revision
113481
Author
[email protected]
Date
2012-04-06 12:43:22 -0700 (Fri, 06 Apr 2012)

Log Message

context-lost.html is failing
https://bugs.webkit.org/show_bug.cgi?id=81325

Reviewed by James Robinson.

Ensure that the DrawingBuffer does not attempt to restore the
TEXTURE_2D binding to an already-deleted texture.

Tested with layout test fast/canvas/webgl/context-lost.html as
well as WebGL conformance tests.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::loseContextImpl):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113480 => 113481)


--- trunk/Source/WebCore/ChangeLog	2012-04-06 19:37:20 UTC (rev 113480)
+++ trunk/Source/WebCore/ChangeLog	2012-04-06 19:43:22 UTC (rev 113481)
@@ -1,3 +1,20 @@
+2012-04-06  Kenneth Russell  <[email protected]>
+
+        context-lost.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=81325
+
+        Reviewed by James Robinson.
+
+        Ensure that the DrawingBuffer does not attempt to restore the
+        TEXTURE_2D binding to an already-deleted texture.
+
+        Tested with layout test fast/canvas/webgl/context-lost.html as
+        well as WebGL conformance tests.
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore):
+        (WebCore::WebGLRenderingContext::loseContextImpl):
+
 2012-04-06  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r113267.

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (113480 => 113481)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2012-04-06 19:37:20 UTC (rev 113480)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2012-04-06 19:43:22 UTC (rev 113481)
@@ -4278,6 +4278,11 @@
 
     detachAndRemoveAllObjects();
 
+    if (m_drawingBuffer) {
+        // Make absolutely sure we do not refer to an already-deleted texture.
+        m_drawingBuffer->setTexture2DBinding(0);
+    }
+
     // There is no direct way to clear errors from a GL implementation and
     // looping until getError() becomes NO_ERROR might cause an infinite loop if
     // the driver or context implementation had a bug. So, loop a reasonably
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to