Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
index d6859198543723a4e29edd42eaced97e77ba7872..5c6e980588dfb877d7138086fa79df0fe387ad9e 100644 |
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
@@ -335,12 +335,13 @@ bool GraphicsLayer::paintWithoutCommit(const IntRect* interestRect, GraphicsCont |
interestRect = &newInterestRect; |
} |
- if (!getPaintController().subsequenceCachingIsDisabled() |
- && !m_client->needsRepaint(*this) |
+ if (!m_client->needsRepaint(*this) |
&& !getPaintController().cacheIsEmpty() |
&& m_previousInterestRect == *interestRect) { |
ASSERT(!getPaintController().hasInvalidations()); |
- return false; |
+ if (!getPaintController().subsequenceCachingIsDisabled()) |
+ return false; |
+ DisplayItemClient::s_cacheStatus = true; |
} |
GraphicsContext context(getPaintController(), disabledMode); |
@@ -358,6 +359,7 @@ bool GraphicsLayer::paintWithoutCommit(const IntRect* interestRect, GraphicsCont |
m_previousInterestRect = *interestRect; |
m_client->paintContents(this, context, m_paintingPhase, *interestRect); |
notifyFirstPaintToClient(); |
+ DisplayItemClient::s_cacheStatus = false; |
return true; |
} |
@@ -1217,6 +1219,13 @@ void GraphicsLayer::setCompositorMutableProperties(uint32_t properties) |
layer->setCompositorMutableProperties(properties); |
} |
+void GraphicsLayer::setCanUseClientCacheStatus(bool b) |
+{ |
+ if (!drawsContent()) |
+ return; |
+ getPaintController().setCanUseClientCacheStatus(b); |
+} |
+ |
} // namespace blink |
#ifndef NDEBUG |