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

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

Issue 1415143005: Preparation for enabling slimming paint synchronized painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix webkit_unit_tests 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 92a5678076aae0a620e5187d444f6b1ad2b0eae2..e9f41b22e32f0aaaac61a66746f54b54af292c8e 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -301,6 +301,15 @@ void GraphicsLayer::paintIfNeeded(GraphicsContext& context)
if (firstPaintInvalidationTrackingEnabled())
m_debugInfo.clearAnnotatedInvalidateRects();
incrementPaintCount();
+#ifndef NDEBUG
+ if (m_paintController && contentsOpaque() && s_drawDebugRedFill) {
+ FloatRect rect(FloatPoint(), size());
+ if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, DisplayItem::DebugRedFill)) {
+ DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect);
+ context.fillRect(rect, SK_ColorRED);
+ }
+ }
+#endif
m_client->paintContentsIfNeeded(this, context, m_paintingPhase);
notifyFirstPaintToClient();
}

Powered by Google App Engine
This is Rietveld 408576698