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

Unified Diff: Source/core/rendering/RenderLayerRepainter.cpp

Issue 474793002: Add GraphicsLayerDebugInfo::includesNewPaintInvalidation to distinguish paint from new RenderObjects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/core/rendering/RenderMultiColumnSet.h » ('j') | Source/core/rendering/RenderObject.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerRepainter.cpp
diff --git a/Source/core/rendering/RenderLayerRepainter.cpp b/Source/core/rendering/RenderLayerRepainter.cpp
index 62336f563659bdeb02247c95cbe44d53d43ab0b1..a3e0b9ba7990b29a89a0f90dbb261d0c79cfb589 100644
--- a/Source/core/rendering/RenderLayerRepainter.cpp
+++ b/Source/core/rendering/RenderLayerRepainter.cpp
@@ -110,14 +110,25 @@ void RenderLayerRepainter::setBackingNeedsPaintInvalidationInRect(const LayoutRe
// https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
// so assert but check that the layer is composited.
ASSERT(m_renderer.compositingState() != NotComposited);
+
+ bool firstPaint = !m_renderer.hadPaintInvalidation();
+ m_renderer.setHadPaintInvalidation();
+
// FIXME: generalize accessors to backing GraphicsLayers so that this code is squashing-agnostic.
if (m_renderer.layer()->groupedMapping()) {
LayoutRect paintInvalidationRect = r;
paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation());
- if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()->squashingLayer())
+ if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()->squashingLayer()) {
squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInvalidationRect));
+ if (firstPaint)
+ squashingLayer->setIncludesFirstPaintInvalidation();
+ }
} else {
- m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r);
+ CompositedLayerMapping* mapping = m_renderer.layer()->compositedLayerMapping();
+ ASSERT(mapping);
+ mapping->setContentsNeedDisplayInRect(r);
+ if (firstPaint)
+ mapping->mainGraphicsLayer()->setIncludesFirstPaintInvalidation();
}
}
« no previous file with comments | « no previous file | Source/core/rendering/RenderMultiColumnSet.h » ('j') | Source/core/rendering/RenderObject.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698