Title: [121864] trunk/Source
Revision
121864
Author
[email protected]
Date
2012-07-04 10:27:20 -0700 (Wed, 04 Jul 2012)

Log Message

[chromium] Clear RenderSurfaces still when no idle paint will be done
https://bugs.webkit.org/show_bug.cgi?id=90553

Reviewed by Adrienne Walker.

Source/WebCore:

Currently if idle painting is disabled, updateLayers() will early-out.
But this prevents it from doing cleanup and clearing all RenderSurface
pointers, leaving the layer tree in an unexpected state.

Tests: CCLayerTreeHostTestCompositeAndReadbackCleanup

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateLayers):

Source/WebKit/chromium:

* tests/CCLayerTreeHostTest.cpp:
(CCLayerTreeHostTestCompositeAndReadbackCleanup):
(WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::CCLayerTreeHostTestCompositeAndReadbackCleanup):
(WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::beginTest):
(WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::afterTest):
(WTF):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121863 => 121864)


--- trunk/Source/WebCore/ChangeLog	2012-07-04 17:18:17 UTC (rev 121863)
+++ trunk/Source/WebCore/ChangeLog	2012-07-04 17:27:20 UTC (rev 121864)
@@ -1,3 +1,19 @@
+2012-07-04  Dana Jansens  <[email protected]>
+
+        [chromium] Clear RenderSurfaces still when no idle paint will be done
+        https://bugs.webkit.org/show_bug.cgi?id=90553
+
+        Reviewed by Adrienne Walker.
+
+        Currently if idle painting is disabled, updateLayers() will early-out.
+        But this prevents it from doing cleanup and clearing all RenderSurface
+        pointers, leaving the layer tree in an unexpected state.
+
+        Tests: CCLayerTreeHostTestCompositeAndReadbackCleanup
+
+        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+        (WebCore::CCLayerTreeHost::updateLayers):
+
 2012-07-04  John Mellor  <[email protected]>
 
         Text Autosizing: Add compile flag and runtime setting

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (121863 => 121864)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2012-07-04 17:18:17 UTC (rev 121863)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2012-07-04 17:27:20 UTC (rev 121864)
@@ -493,13 +493,13 @@
     prioritizeTextures(updateList);
 
     paintLayerContents(updateList, PaintVisible, updater);
-    if (!m_triggerIdlePaints)
-        return;
 
-    // The second (idle) paint will be a no-op in layers where painting already occured above.
-    // FIXME: This pass can be merged with the visible pass now that textures
-    //        are prioritized above.
-    paintLayerContents(updateList, PaintIdle, updater);
+    if (m_triggerIdlePaints) {
+        // The second (idle) paint will be a no-op in layers where painting already occured above.
+        // FIXME: This pass can be merged with the visible pass now that textures
+        //        are prioritized above.
+        paintLayerContents(updateList, PaintIdle, updater);
+    }
 
     for (size_t i = 0; i < updateList.size(); ++i)
         updateList[i]->clearRenderSurface();

Modified: trunk/Source/WebKit/chromium/ChangeLog (121863 => 121864)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-07-04 17:18:17 UTC (rev 121863)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-07-04 17:27:20 UTC (rev 121864)
@@ -1,5 +1,19 @@
 2012-07-04  Dana Jansens  <[email protected]>
 
+        [chromium] Clear RenderSurfaces still when no idle paint will be done
+        https://bugs.webkit.org/show_bug.cgi?id=90553
+
+        Reviewed by Adrienne Walker.
+
+        * tests/CCLayerTreeHostTest.cpp:
+        (CCLayerTreeHostTestCompositeAndReadbackCleanup):
+        (WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::CCLayerTreeHostTestCompositeAndReadbackCleanup):
+        (WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::beginTest):
+        (WTF::CCLayerTreeHostTestCompositeAndReadbackCleanup::afterTest):
+        (WTF):
+
+2012-07-04  Dana Jansens  <[email protected]>
+
         [chromium] Remove CCLayerTreeHostTestThreadOnly class to cleanup CCLayerTreeHostTests
         https://bugs.webkit.org/show_bug.cgi?id=90556
 

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (121863 => 121864)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-07-04 17:18:17 UTC (rev 121863)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-07-04 17:27:20 UTC (rev 121864)
@@ -2251,4 +2251,26 @@
     runTest(true);
 }
 
+class CCLayerTreeHostTestCompositeAndReadbackCleanup : public CCLayerTreeHostTest {
+public:
+    CCLayerTreeHostTestCompositeAndReadbackCleanup() { }
+
+    virtual void beginTest()
+    {
+        LayerChromium* rootLayer = m_layerTreeHost->rootLayer();
+
+        OwnArrayPtr<char> pixels(adoptArrayPtr(new char[4]));
+        m_layerTreeHost->compositeAndReadback(static_cast<void*>(pixels.get()), IntRect(0, 0, 1, 1));
+        EXPECT_FALSE(rootLayer->renderSurface());
+
+        endTest();
+    }
+
+    virtual void afterTest()
+    {
+    }
+};
+
+SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestCompositeAndReadbackCleanup)
+
 } // namespace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to