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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 1416053003: Let synchronized painting generate correct paint invalidation rects (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/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index aefc55559d2a83e8151df2f99fb89ecae2d5727c..bb046b04f4fafd3a2ee0c8c7006b841543b28278 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -402,18 +402,23 @@ void LayoutBoxModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRe
}
}
-void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayItemClientWrapper& displayItemClient, PaintInvalidationReason invalidationReason, const LayoutRect& previousPaintInvalidationRect, const LayoutRect& newPaintInvalidationRect) const
+void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayItemClientWrapper& displayItemClient, PaintInvalidationReason invalidationReason, const Vector<LayoutRect>& paintInvalidationRects) const
{
if (layer()->groupedMapping()) {
- if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer())
- squashingLayer->invalidateDisplayItemClient(displayItemClient, invalidationReason, enclosingIntRect(previousPaintInvalidationRect), enclosingIntRect(newPaintInvalidationRect));
+ if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer()) {
+ // Note: the subpixel accumulation of layer() does not need to be added here. It is already taken into account.
+ Vector<IntRect> layerPaintInvalidationRects;
+ for (const auto& rect : paintInvalidationRects)
+ layerPaintInvalidationRects.append(enclosingIntRect(rect));
+ squashingLayer->invalidateDisplayItemClient(displayItemClient, invalidationReason, layerPaintInvalidationRects);
+ }
} else if (CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping()) {
if (this->displayItemClient() != displayItemClient.displayItemClient() && isBox() && toLayoutBox(this)->usesCompositedScrolling()) {
// This paint invalidation container is using composited scrolling, and we are invalidating a scrolling content,
// so we should invalidate on the scrolling contents layer only.
- compositedLayerMapping->invalidateDisplayItemClientOnScrollingContentsLayer(displayItemClient, invalidationReason, previousPaintInvalidationRect, newPaintInvalidationRect);
+ compositedLayerMapping->invalidateDisplayItemClientOnScrollingContentsLayer(displayItemClient, invalidationReason, paintInvalidationRects);
} else {
- compositedLayerMapping->invalidateDisplayItemClient(displayItemClient, invalidationReason, previousPaintInvalidationRect, newPaintInvalidationRect);
+ compositedLayerMapping->invalidateDisplayItemClient(displayItemClient, invalidationReason, paintInvalidationRects);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698