Commit a0a09190 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[chromium] Early out in a new prepareToDraw() step if checkerboarding an...

[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
parent 3be076ee
2012-03-22 Dana Jansens <danakj@chromium.org>
[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
Reviewed by Adrienne Walker.
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):
2012-03-22 Levi Weintraub <leviw@chromium.org>
 
Correct LayoutUnit usage in Accessibility code
......@@ -136,7 +136,7 @@ PassOwnPtr<CCSharedQuadState> CCLayerImpl::createSharedQuadState() const
return CCSharedQuadState::create(quadTransform(), drawTransform(), visibleLayerRect(), layerClipRect, drawOpacity(), opaque());
}
void CCLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
void CCLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
{
appendGutterQuads(quadList, sharedQuadState);
}
......
......@@ -84,7 +84,7 @@ public:
PassOwnPtr<CCSharedQuadState> createSharedQuadState() const;
virtual void willDraw(LayerRendererChromium*) { }
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*);
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& usedCheckerboard);
virtual void didDraw() { }
void appendDebugBorderQuad(CCQuadCuller&, const CCSharedQuadState*) const;
......
......@@ -220,9 +220,10 @@ static FloatRect damageInSurfaceSpace(CCLayerImpl* renderSurfaceLayer, const Flo
return surfaceDamageRect;
}
void CCLayerTreeHostImpl::calculateRenderPasses(CCRenderPassList& passes, CCLayerList& renderSurfaceLayerList)
bool CCLayerTreeHostImpl::calculateRenderPasses(CCRenderPassList& passes, CCLayerList& renderSurfaceLayerList)
{
TRACE_EVENT1("webkit", "CCLayerTreeHostImpl::calculateRenderPasses", "renderSurfaceLayerList.size()", static_cast<long long unsigned>(renderSurfaceLayerList.size()));
ASSERT(passes.isEmpty());
ASSERT(renderSurfaceLayerList.isEmpty());
renderSurfaceLayerList.append(rootLayer());
......@@ -239,6 +240,8 @@ void CCLayerTreeHostImpl::calculateRenderPasses(CCRenderPassList& passes, CCLaye
CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootLayer(), rootLayer(), identityMatrix, identityMatrix, renderSurfaceLayerList, rootLayer()->renderSurface()->layerList(), &m_layerSorter, layerRendererCapabilities().maxTextureSize);
}
TRACE_EVENT1("webkit", "CCLayerTreeHostImpl::calculateRenderPasses", "renderSurfaceLayerList.size()", static_cast<long long unsigned>(renderSurfaceLayerList.size()));
if (layerRendererCapabilities().usingPartialSwap)
trackDamageForAllSurfaces(rootLayer(), renderSurfaceLayerList);
m_rootDamageRect = rootLayer()->renderSurface()->damageTracker()->currentDamageRect();
......@@ -272,6 +275,9 @@ void CCLayerTreeHostImpl::calculateRenderPasses(CCRenderPassList& passes, CCLaye
// Add quads to the Render passes in FrontToBack order to allow for testing occlusion and performing culling during the tree walk.
typedef CCLayerIterator<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, CCLayerIteratorActions::FrontToBack> CCLayerIteratorType;
// If we are unable to draw an animation on some layer, then we abort the entire frame.
bool drawFrame = true;
CCLayerIteratorType end = CCLayerIteratorType::end(&renderSurfaceLayerList);
for (CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList); it != end; ++it) {
CCRenderSurface* renderSurface = it.targetRenderSurfaceLayer()->renderSurface();
......@@ -295,11 +301,23 @@ void CCLayerTreeHostImpl::calculateRenderPasses(CCRenderPassList& passes, CCLaye
}
it->willDraw(m_layerRenderer.get());
pass->appendQuadsForLayer(*it, &occlusionTracker);
bool usedCheckerboard = false;
pass->appendQuadsForLayer(*it, &occlusionTracker, usedCheckerboard);
if (usedCheckerboard) {
bool layerHasAnimatingTransform = it->screenSpaceTransformIsAnimating() || it->drawTransformIsAnimating();
if (layerHasAnimatingTransform) {
drawFrame = false;
break;
}
}
occlusionTracker.markOccludedBehindLayer(*it);
}
occlusionTracker.overdrawMetrics().recordMetrics(this);
if (drawFrame)
occlusionTracker.overdrawMetrics().recordMetrics(this);
return drawFrame;
}
void CCLayerTreeHostImpl::animateLayersRecursive(CCLayerImpl* current, double monotonicTime, double wallClockTime, CCAnimationEventsVector* events, bool& didAnimate, bool& needsAnimateLayers)
......@@ -339,26 +357,39 @@ IntSize CCLayerTreeHostImpl::contentSize() const
return m_scrollLayerImpl->children()[0]->contentBounds();
}
void CCLayerTreeHostImpl::drawLayers()
bool CCLayerTreeHostImpl::prepareToDraw(FrameData& frame)
{
TRACE_EVENT("CCLayerTreeHostImpl::drawLayers", this, 0);
ASSERT(m_layerRenderer);
TRACE_EVENT("CCLayerTreeHostImpl::prepareToDraw", this, 0);
frame.renderPasses.clear();
frame.renderSurfaceLayerList.clear();
if (!rootLayer())
return;
return false;
CCRenderPassList passes;
CCLayerList renderSurfaceLayerList;
calculateRenderPasses(passes, renderSurfaceLayerList);
if (!calculateRenderPasses(frame.renderPasses, frame.renderSurfaceLayerList)) {
frame.renderPasses.clear();
frame.renderSurfaceLayerList.clear();
return false;
}
// If we return true, then we expect drawLayers() to be called before this function is called again.
return true;
}
void CCLayerTreeHostImpl::drawLayers(const FrameData& frame)
{
TRACE_EVENT("CCLayerTreeHostImpl::drawLayers", this, 0);
ASSERT(m_layerRenderer);
m_layerRenderer->beginDrawingFrame();
for (size_t i = 0; i < passes.size(); ++i)
m_layerRenderer->drawRenderPass(passes[i].get());
for (size_t i = 0; i < frame.renderPasses.size(); ++i)
m_layerRenderer->drawRenderPass(frame.renderPasses[i].get());
typedef CCLayerIterator<CCLayerImpl, Vector<CCLayerImpl*>, CCRenderSurface, CCLayerIteratorActions::BackToFront> CCLayerIteratorType;
CCLayerIteratorType end = CCLayerIteratorType::end(&renderSurfaceLayerList);
for (CCLayerIteratorType it = CCLayerIteratorType::begin(&renderSurfaceLayerList); it != end; ++it) {
CCLayerIteratorType end = CCLayerIteratorType::end(&frame.renderSurfaceLayerList);
for (CCLayerIteratorType it = CCLayerIteratorType::begin(&frame.renderSurfaceLayerList); it != end; ++it) {
if (it.representsItself() && !it->visibleLayerRect().isEmpty())
it->didDraw();
}
......
......@@ -60,6 +60,8 @@ public:
// CCLayerTreeHostImpl owns the CCLayerImpl tree as well as associated rendering state
class CCLayerTreeHostImpl : public CCInputHandlerClient, LayerRendererChromiumClient {
WTF_MAKE_NONCOPYABLE(CCLayerTreeHostImpl);
typedef Vector<CCLayerImpl*> CCLayerList;
public:
static PassOwnPtr<CCLayerTreeHostImpl> create(const CCSettings&, CCLayerTreeHostImplClient*);
virtual ~CCLayerTreeHostImpl();
......@@ -77,11 +79,17 @@ public:
virtual void setActiveGestureAnimation(PassOwnPtr<CCActiveGestureAnimation>);
virtual void scheduleAnimation();
struct FrameData {
CCRenderPassList renderPasses;
CCLayerList renderSurfaceLayerList;
};
// Virtual for testing.
virtual void beginCommit();
virtual void commitComplete();
virtual void animate(double monotonicTime, double wallClockTime);
virtual void drawLayers();
virtual bool prepareToDraw(FrameData&);
virtual void drawLayers(const FrameData&);
// LayerRendererChromiumClient implementation
virtual const IntSize& viewportSize() const { return m_viewportSize; }
......@@ -151,8 +159,6 @@ protected:
int m_frameNumber;
private:
typedef Vector<CCLayerImpl*> CCLayerList;
void computeDoubleTapZoomDeltas(CCScrollAndScaleSet* scrollInfo);
void computePinchZoomDeltas(CCScrollAndScaleSet* scrollInfo);
void makeScrollAndScaleSet(CCScrollAndScaleSet* scrollInfo, const IntSize& scrollOffset, float pageScale);
......@@ -162,7 +168,8 @@ private:
void adjustScrollsForPageScaleChange(float);
void updateMaxScrollPosition();
void trackDamageForAllSurfaces(CCLayerImpl* rootDrawLayer, const CCLayerList& renderSurfaceLayerList);
void calculateRenderPasses(CCRenderPassList&, CCLayerList& renderSurfaceLayerList);
// Returns false if the frame should not be displayed.
bool calculateRenderPasses(CCRenderPassList&, CCLayerList& renderSurfaceLayerList);
void animateLayersRecursive(CCLayerImpl*, double monotonicTime, double wallClockTime, CCAnimationEventsVector*, bool& didAnimate, bool& needsAnimateLayers);
IntSize contentSize() const;
void sendDidLoseContextRecursive(CCLayerImpl*);
......
......@@ -47,7 +47,7 @@ CCQuadCuller::CCQuadCuller(CCQuadList& quadList, CCLayerImpl* layer, CCOcclusion
{
}
void CCQuadCuller::append(PassOwnPtr<CCDrawQuad> passDrawQuad)
bool CCQuadCuller::append(PassOwnPtr<CCDrawQuad> passDrawQuad)
{
OwnPtr<CCDrawQuad> drawQuad(passDrawQuad);
IntRect culledRect = m_occlusionTracker->unoccludedContentRect(m_layer, drawQuad->quadRect());
......@@ -61,6 +61,7 @@ void CCQuadCuller::append(PassOwnPtr<CCDrawQuad> passDrawQuad)
// Release the quad after we're done using it.
if (keepQuad)
m_quadList.append(drawQuad.release());
return keepQuad;
}
} // namespace WebCore
......
......@@ -38,7 +38,8 @@ public:
// done to estimate over draw statistics.
CCQuadCuller(CCQuadList&, CCLayerImpl*, CCOcclusionTrackerImpl*);
virtual void append(PassOwnPtr<CCDrawQuad> passDrawQuad);
// Returns true if the quad is added to the list, and false if the quad is entirely culled.
virtual bool append(PassOwnPtr<CCDrawQuad> passDrawQuad);
private:
CCQuadList& m_quadList;
......
......@@ -46,12 +46,12 @@ CCRenderPass::CCRenderPass(CCRenderSurface* targetSurface)
ASSERT(m_targetSurface);
}
void CCRenderPass::appendQuadsForLayer(CCLayerImpl* layer, CCOcclusionTrackerImpl* occlusionTracker)
void CCRenderPass::appendQuadsForLayer(CCLayerImpl* layer, CCOcclusionTrackerImpl* occlusionTracker, bool& usedCheckerboard)
{
CCQuadCuller quadCuller(m_quadList, layer, occlusionTracker);
OwnPtr<CCSharedQuadState> sharedQuadState = layer->createSharedQuadState();
layer->appendQuads(quadCuller, sharedQuadState.get());
layer->appendQuads(quadCuller, sharedQuadState.get(), usedCheckerboard);
layer->appendDebugBorderQuad(quadCuller, sharedQuadState.get());
m_sharedQuadStateList.append(sharedQuadState.release());
}
......
......@@ -54,7 +54,7 @@ class CCRenderPass {
public:
static PassOwnPtr<CCRenderPass> create(CCRenderSurface*);
void appendQuadsForLayer(CCLayerImpl*, CCOcclusionTrackerImpl*);
void appendQuadsForLayer(CCLayerImpl*, CCOcclusionTrackerImpl*, bool& usedCheckerboard);
void appendQuadsForRenderSurfaceLayer(CCLayerImpl*);
const CCQuadList& quadList() const { return m_quadList; }
......
......@@ -79,7 +79,7 @@ void CCScrollbarLayerImpl::willDraw(LayerRendererChromium* layerRenderer)
}
}
void CCScrollbarLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
void CCScrollbarLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
{
if (!m_texture->isReserved())
return;
......
......@@ -60,7 +60,7 @@ public:
void setScrollLayer(CCLayerImpl* scrollLayer) { m_scrollLayer = scrollLayer; }
virtual void willDraw(LayerRendererChromium*);
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*);
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& usedCheckerboard);
virtual void didDraw();
protected:
......
......@@ -298,7 +298,9 @@ bool CCSingleThreadProxy::doComposite()
double wallClockTime = currentTime();
m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
m_layerTreeHostImpl->drawLayers();
CCLayerTreeHostImpl::FrameData frame;
m_layerTreeHostImpl->prepareToDraw(frame);
m_layerTreeHostImpl->drawLayers(frame);
}
if (m_layerTreeHostImpl->isContextLost()) {
......
......@@ -57,7 +57,7 @@ TransformationMatrix CCSolidColorLayerImpl::quadTransform() const
return solidColorTransform;
}
void CCSolidColorLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
void CCSolidColorLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
{
// We create a series of smaller quads instead of just one large one so that the
// culler can reduce the total pixels drawn.
......
......@@ -42,7 +42,7 @@ public:
virtual ~CCSolidColorLayerImpl();
virtual TransformationMatrix quadTransform() const;
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*);
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& usedCheckerboard);
protected:
explicit CCSolidColorLayerImpl(int id);
......
......@@ -90,7 +90,7 @@ void CCTextureLayerImpl::willDraw(LayerRendererChromium* layerRenderer)
}
}
void CCTextureLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
void CCTextureLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
{
IntRect quadRect(IntPoint(), bounds());
quadList.append(CCTextureDrawQuad::create(sharedQuadState, quadRect, m_textureId, m_hasAlpha, m_premultipliedAlpha, m_uvRect, m_flipped, m_ioSurfaceSize, m_ioSurfaceTextureId));
......
......@@ -40,7 +40,7 @@ public:
}
virtual ~CCTextureLayerImpl();
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*);
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& usedCheckerboard);
typedef ProgramBinding<VertexShaderPosTex, FragmentShaderRGBATexFlipAlpha> ProgramFlip;
typedef ProgramBinding<VertexShaderPosTexStretch, FragmentShaderRGBATexAlpha> ProgramStretch;
......
......@@ -555,7 +555,9 @@ void CCThreadProxy::scheduledActionDrawAndSwap()
m_inputHandlerOnImplThread->animate(monotonicTime);
m_layerTreeHostImpl->animate(monotonicTime, wallClockTime);
m_layerTreeHostImpl->drawLayers();
CCLayerTreeHostImpl::FrameData frame;
m_layerTreeHostImpl->prepareToDraw(frame);
m_layerTreeHostImpl->drawLayers(frame);
// Check for a pending compositeAndReadback.
if (m_readbackRequestOnImplThread) {
......
......@@ -123,7 +123,7 @@ TransformationMatrix CCTiledLayerImpl::quadTransform() const
return transform;
}
void CCTiledLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
void CCTiledLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool& usedCheckerboard)
{
const IntRect& layerRect = visibleLayerRect();
......@@ -149,7 +149,7 @@ void CCTiledLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadSta
continue;
if (!tile || !tile->textureId()) {
quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, tileRect, backgroundColor()));
usedCheckerboard |= quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, tileRect, backgroundColor()));
continue;
}
......
......@@ -43,7 +43,7 @@ public:
}
virtual ~CCTiledLayerImpl();
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*);
virtual void appendQuads(CCQuadCuller&, const CCSharedQuadState*, bool& usedCheckerboard);
virtual void bindContentsTexture(LayerRendererChromium*);
......
......@@ -154,7 +154,7 @@ void CCVideoLayerImpl::willDraw(LayerRendererChromium* layerRenderer)
}
}
void CCVideoLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
void CCVideoLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
{
if (!m_frame)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment