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

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

Issue 353403006: Consider subpixel accumulation when invalidating paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Also squashing path Created 6 years, 6 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: Source/core/rendering/RenderLayerRepainter.cpp
diff --git a/Source/core/rendering/RenderLayerRepainter.cpp b/Source/core/rendering/RenderLayerRepainter.cpp
index a1fa5652aec8f32003aa5485bb3c24d1541fc0b5..af45a20c80f95be4ee326c97ea460fc0639278c4 100644
--- a/Source/core/rendering/RenderLayerRepainter.cpp
+++ b/Source/core/rendering/RenderLayerRepainter.cpp
@@ -77,7 +77,7 @@ void RenderLayerRepainter::repaintIncludingNonCompositingDescendants()
void RenderLayerRepainter::repaintIncludingNonCompositingDescendantsInternal(const RenderLayerModelObject* repaintContainer)
{
- m_renderer.invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_renderer.boundsRectForPaintInvalidation(repaintContainer)), InvalidationLayer);
+ m_renderer.invalidatePaintUsingContainer(repaintContainer, m_renderer.boundsRectForPaintInvalidation(repaintContainer), InvalidationLayer);
// FIXME: Repaints can be issued during style recalc at present, via RenderLayerModelObject::styleWillChange. This happens in scenarios when
// repaint is needed but not layout.
@@ -124,13 +124,14 @@ void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r)
view->repaintViewRectangle(absRect);
return;
}
- IntRect repaintRect = pixelSnappedIntRect(r);
// FIXME: generalize accessors to backing GraphicsLayers so that this code is squasphing-agnostic.
if (m_renderer.layer()->groupedMapping()) {
+ LayoutRect repaintRect = r;
+ repaintRect.move(m_renderer.layer()->subpixelAccumulation());
if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()->squashingLayer())
- squashingLayer->setNeedsDisplayInRect(repaintRect);
+ squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(repaintRect));
} else {
- m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(repaintRect);
+ m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r);
}
}

Powered by Google App Engine
This is Rietveld 408576698