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

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

Issue 1390123002: (WIP) Paint property hierarchy approach 1 of 2 (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 21f225a6b10ccf0622d76da6c59e1f248f62dedd..dbbf81d4d35f277186534aa4dceba0c31c7c47e1 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -299,7 +299,7 @@ void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I
m_debugInfo.clearAnnotatedInvalidateRects();
incrementPaintCount();
#ifndef NDEBUG
- if (m_displayItemList && contentsOpaque() && s_drawDebugRedFill) {
+ if (m_paintArtifact && contentsOpaque() && s_drawDebugRedFill) {
FloatRect rect(FloatPoint(), size());
if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, DisplayItem::DebugRedFill)) {
DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect);
@@ -797,8 +797,8 @@ void GraphicsLayer::setSize(const FloatSize& size)
#ifndef NDEBUG
// The red debug fill needs to be invalidated if the layer resizes.
- if (m_displayItemList)
- m_displayItemList->invalidateUntracked(displayItemClient());
+ if (m_paintArtifact)
+ m_paintArtifact->displayItemList().invalidateUntracked(displayItemClient());
#endif
}
@@ -1189,11 +1189,11 @@ void GraphicsLayer::didScroll()
}
}
-DisplayItemList* GraphicsLayer::displayItemList()
+PaintArtifact* GraphicsLayer::paintArtifact()
{
- if (!m_displayItemList)
- m_displayItemList = DisplayItemList::create();
- return m_displayItemList.get();
+ if (!m_paintArtifact)
+ m_paintArtifact = PaintArtifact::create();
+ return m_paintArtifact.get();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698