DescriptionMerge 116587 - [chromium] Don't draw when canDraw() is false
https://bugs.webkit.org/show_bug.cgi?id=85829
Reviewed by Adrienne Walker.
Source/WebCore:
This is based on the work of Daniel Sievers in bug
https://bugs.webkit.org/show_bug.cgi?id=82680. When canDraw() is false,
we should not call drawLayers() or prepareToDraw() in both Single- and
Multi-Threaded mode.
drawLayers() is crashing in single threaded mode, and this attempts to
prevent it from being called with invalid state. While making it behave
properly in single-threaded mode, it seems appropriate to unrevert the
parts of 82680 that made threaded mode behave similarly appropriately.
A single-threaded test is not included since LTHTests is unable to run
in single-threaded mode at this time (pending work from Ian Vollick). So
we test in threaded mode only with a note to include a single thread
version.
Tests: CCLayerTreeHostTestCanDrawBlocksDrawing.runMultiThread
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::prepareToDraw):
(WebCore::CCLayerTreeHostImpl::drawLayers):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::doComposite):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
Source/WebKit/chromium:
* tests/CCLayerTreeHostImplTest.cpp:
(WebKitTests::CCLayerTreeHostImplTest::CCLayerTreeHostImplTest):
(WebKitTests::TEST_F):
* tests/CCLayerTreeHostTest.cpp:
(WTF):
(CCLayerTreeHostTestCanDrawBlocksDrawing):
(WTF::CCLayerTreeHostTestCanDrawBlocksDrawing::CCLayerTreeHostTestCanDrawBlocksDrawing):
(WTF::CCLayerTreeHostTestCanDrawBlocksDrawing::beginTest):
(WTF::CCLayerTreeHostTestCanDrawBlocksDrawing::commitCompleteOnCCThread):
(WTF::CCLayerTreeHostTestCanDrawBlocksDrawing::drawLayersOnCCThread):
(WTF::CCLayerTreeHostTestCanDrawBlocksDrawing::didCommitAndDrawFrame):
(WTF::CCLayerTreeHostTestCanDrawBlocksDrawing::afterTest):
(WTF::TEST_F):
TBR=danakj@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=117087
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|