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

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: 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 2b2ec9c4267bc42879927ba9be05f8571a3811a9..5033035c9d7396472ae0a246e189917d70616eee 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -299,7 +299,20 @@ 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
Xianzhu 2015/10/28 18:10:23 These are copied from GraphicsLayer::paint(). Per
m_client->paintContentsIfNeeded(this, context, m_paintingPhase);
+ if (!m_textPainted && m_paintController->textPainted()) {
+ m_textPainted = true;
+ m_client->notifyTextPainted();
+ }
}
void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)

Powered by Google App Engine
This is Rietveld 408576698