Title: [106610] trunk/Source/WebCore
Revision
106610
Author
[email protected]
Date
2012-02-02 18:13:25 -0800 (Thu, 02 Feb 2012)

Log Message

Avoid crashing renderer when GPU process dies by not caching textures between video frames.
https://bugs.webkit.org/show_bug.cgi?id=77654

Patch by Ami Fischman <[email protected]> on 2012-02-02
Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::draw):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106609 => 106610)


--- trunk/Source/WebCore/ChangeLog	2012-02-03 02:04:51 UTC (rev 106609)
+++ trunk/Source/WebCore/ChangeLog	2012-02-03 02:13:25 UTC (rev 106610)
@@ -1,3 +1,13 @@
+2012-02-02  Ami Fischman  <[email protected]>
+
+        Avoid crashing renderer when GPU process dies by not caching textures between video frames.
+        https://bugs.webkit.org/show_bug.cgi?id=77654
+
+        Reviewed by James Robinson.
+
+        * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
+        (WebCore::CCVideoLayerImpl::draw):
+
 2012-02-02  Anders Carlsson  <[email protected]>
 
         Add ScrollingTree class

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp (106609 => 106610)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp	2012-02-03 02:04:51 UTC (rev 106609)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp	2012-02-03 02:13:25 UTC (rev 106610)
@@ -150,8 +150,17 @@
         CRASH(); // Someone updated convertVFCFormatToGC3DFormat above but update this!
     }
 
-    for (unsigned plane = 0; plane < frame->planes(); ++plane)
+    for (unsigned plane = 0; plane < frame->planes(); ++plane) {
         m_textures[plane].m_texture->unreserve();
+        // FIXME: ManagedTexture's store a raw pointer to their TextureManager,
+        // and the textures we create use layerRenderer->renderSurfaceTextureManager().
+        // Since there is no guarantee layerRenderer will still be alive the
+        // next time we are called, we clear the texture reference. It would
+        // be nice if instead we could rely on textures being invalidated when
+        // their manager was deleted so that new textures didn't always have to
+        // be recreated for each frame.
+        m_textures[plane].m_texture.clear();
+    }
     m_provider->putCurrentFrame(frame);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to