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

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

Issue 88863002: Land layer squashing behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: not perfect but can be reviewed Created 7 years, 1 month 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: Source/core/rendering/RenderLayerRepainter.cpp
diff --git a/Source/core/rendering/RenderLayerRepainter.cpp b/Source/core/rendering/RenderLayerRepainter.cpp
index eb65cb6db4750e68ca047ed71d729f1db3b805c7..0118cc0e28f3f566733edb5dc07fde0c3ba948ef 100644
--- a/Source/core/rendering/RenderLayerRepainter.cpp
+++ b/Source/core/rendering/RenderLayerRepainter.cpp
@@ -155,16 +155,22 @@ LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
void RenderLayerRepainter::setBackingNeedsRepaint()
{
- ASSERT(m_renderer->hasCompositedLayerMapping());
- m_renderer->compositedLayerMapping()->setContentsNeedDisplay();
+ ASSERT(m_renderer->compositingState() != NotComposited);
+
+ if (m_renderer->compositingState() == PaintsIntoGroupedBacking) {
+ // FIXME: should probably setNeedsDisplayInRect for this layer's bounds only.
+ m_renderer->groupedMapping()->squashingLayer()->setNeedsDisplay();
+ } else {
+ m_renderer->compositedLayerMapping()->setContentsNeedDisplay();
+ }
}
void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r)
{
// 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->hasCompositedLayerMapping());
- if (!m_renderer->hasCompositedLayerMapping()) {
+ ASSERT(m_renderer->compositingState() != NotComposited);
+ if (m_renderer->compositingState() == NotComposited) {
// If we're trying to repaint the placeholder document layer, propagate the
// repaint to the native view system.
LayoutRect absRect(r);
@@ -176,7 +182,13 @@ void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r)
if (view)
view->repaintViewRectangle(absRect);
} else {
- m_renderer->compositedLayerMapping()->setContentsNeedDisplayInRect(pixelSnappedIntRect(r));
+ if (m_renderer->compositingState() == PaintsIntoGroupedBacking) {
+ IntRect offsetRect = pixelSnappedIntRect(r);
+ offsetRect.move(-m_renderer->layer()->offsetFromSquashingLayerOrigin());
enne (OOO) 2013/11/27 23:20:26 Should you be storing all of these offsets as Layo
shawnsingh 2013/12/02 01:55:03 Would you be OK with us moving forward with this v
+ m_renderer->groupedMapping()->squashingLayer()->setNeedsDisplayInRect(offsetRect);
+ } else {
+ m_renderer->compositedLayerMapping()->setContentsNeedDisplayInRect(pixelSnappedIntRect(r));
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698