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

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

Issue 1393083003: Implement interest rects for synchronized paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 b8d3db51df7ab705eef68d3ba11ce75cf7700936..1547255fdd158e747041352edab0b340703e0ea5 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -292,7 +292,18 @@ void GraphicsLayer::setOffsetDoubleFromLayoutObject(const DoubleSize& offset, Sh
setNeedsDisplay();
}
-void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const IntRect& clip)
+void GraphicsLayer::paintIfNeeded(GraphicsContext& context)
+{
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled());
+ if (!m_client)
+ return;
+ if (firstPaintInvalidationTrackingEnabled())
+ m_debugInfo.clearAnnotatedInvalidateRects();
+ incrementPaintCount();
+ m_client->paintContentsIfNeeded(this, context, m_paintingPhase);
+}
+
+void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
{
if (!m_client)
return;
@@ -1165,12 +1176,6 @@ void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isVie
m_layer->layer()->setScrollClient(this);
}
-void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
-{
- paintGraphicsLayerContents(context, clip);
-}
-
-
void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group)
{
if (m_client)

Powered by Google App Engine
This is Rietveld 408576698