2010-09-07 Vangelis Kokkevis <vangelis@chromium.org>
authorvangelis@chromium.org <vangelis@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Sep 2010 23:05:44 +0000 (23:05 +0000)
committervangelis@chromium.org <vangelis@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Sep 2010 23:05:44 +0000 (23:05 +0000)
        Reviewed by Darin Fisher.

        [chromium] Reset the owner of PlatformLayer's once the GraphicsLayer they are associated with
        gets destroyed.
        https://bugs.webkit.org/show_bug.cgi?id=45329

        Test: Fixes UI test failures downstream for all the Media tests when run on the buildbots (machines without GPUs).

        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
        (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66923 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

index 4d2b1c5..ed6e620 100644 (file)
@@ -1,3 +1,16 @@
+2010-09-07  Vangelis Kokkevis  <vangelis@chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] Reset the owner of PlatformLayer's once the GraphicsLayer they are associated with
+        gets destroyed.
+        https://bugs.webkit.org/show_bug.cgi?id=45329
+
+        Test: Fixes UI test failures downstream for all the Media tests when run on the buildbots (machines without GPUs).
+
+        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+        (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
+
 2010-09-07  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Darin Adler.
index 92cc891..bbae72a 100644 (file)
@@ -106,6 +106,12 @@ GraphicsLayerChromium::GraphicsLayerChromium(GraphicsLayerClient* client)
 
 GraphicsLayerChromium::~GraphicsLayerChromium()
 {
+    if (m_layer)
+        m_layer->setOwner(0);
+    if (m_contentsLayer)
+        m_contentsLayer->setOwner(0);
+    if (m_transformLayer)
+        m_transformLayer->setOwner(0);
 }
 
 void GraphicsLayerChromium::setName(const String& inName)