Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 1508223005: Client side display item cache flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Try performance 2 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698