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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121864
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-04 Dana Jansens <danakj@chromium.org>
+
+ [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 <johnme@chromium.org>
Text Autosizing: Add compile flag and runtime setting
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();
2012-07-04 Dana Jansens <danakj@chromium.org>
+ [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 <danakj@chromium.org>
+
[chromium] Remove CCLayerTreeHostTestThreadOnly class to cleanup CCLayerTreeHostTests
https://bugs.webkit.org/show_bug.cgi?id=90556
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