-
commit-queue@webkit.org authored
[chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame https://bugs.webkit.org/show_bug.cgi?id=81437 Patch by Dana Jansens <danakj@chromium.org> on 2012-03-22 Reviewed by Adrienne Walker. Source/WebCore: Split CCLayerTreeHostImpl::drawLayers() into two phases: prepareToDraw() and drawLayers(). When calculating a RenderPass, and we checkerboard a quad on a layer, bubble this info back up to CCLayerTreeHostImpl. If the layer is transforming in an animation, then abort the prepareToDraw() phase and cause it to return false back to the thread proxy. Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (FrameData): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): Source/WebKit/chromium: * tests/CCAnimationTestCommon.cpp: (WebCore): (WebCore::addAnimatedTransform): (WebKitTests::addOpacityTransitionToLayer): (WebKitTests): (WebKitTests::addAnimatedTransformToLayer): * tests/CCAnimationTestCommon.h: (WebCore): (WebKitTests): * tests/CCLayerTreeHostImplTest.cpp: (WebKitTests::TEST_F): (DidDrawCheckLayer): (WebKitTests::DidDrawCheckLayer::DidDrawCheckLayer): (MissingTextureAnimatingLayer): (WebKitTests::MissingTextureAnimatingLayer::create): (WebKitTests::MissingTextureAnimatingLayer::MissingTextureAnimatingLayer): (WebKitTests): (WebKitTests::BlendStateCheckLayer::appendQuads): * tests/CCLayerTreeHostTest.cpp: (WTF::TestHooks::prepareToDrawOnCCThread): (WTF::MockLayerTreeHostImpl::prepareToDraw): (MockLayerTreeHostImpl): (WTF::MockLayerTreeHostImpl::drawLayers): * tests/CCQuadCullerTest.cpp: (WebCore::appendQuads): * tests/CCSolidColorLayerImplTest.cpp: (CCLayerTestCommon::TEST): * tests/CCTiledLayerImplTest.cpp: (CCLayerTestCommon::TEST): (CCLayerTestCommon::getQuads): * tests/MockCCQuadCuller.h: (WebCore::MockCCQuadCuller::append): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a0a09190