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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2088333002: Use unfragmented clip bounds when fragmentation is inhibited due to compositing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 37f7d4a580967fc64ff1f5eee3e033bbee52aad5..c001d1c055d3172fd41b649ec6e717bd49b82f3d 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1133,7 +1133,7 @@ LayoutRect PaintLayer::transparencyClipBox(const PaintLayer* layer, const PaintL
return result;
}
- LayoutRect clipRect = layer->fragmentsBoundingBox(rootLayer);
+ LayoutRect clipRect = layer->shouldFragmentCompositedBounds(rootLayer) ? layer->fragmentsBoundingBox(rootLayer) : layer->physicalBoundingBox(rootLayer);
expandClipRectForDescendantsAndReflection(clipRect, layer, rootLayer, transparencyBehavior, subPixelAccumulation, globalPaintFlags);
clipRect = layer->mapLayoutRectForFilter(clipRect);
clipRect.move(subPixelAccumulation);
@@ -2164,6 +2164,9 @@ LayoutRect PaintLayer::boundingBoxForCompositingOverlapTest() const
{
// Apply NeverIncludeTransformForAncestorLayer, because the geometry map in CompositingInputsUpdater will take care of applying the
// transform of |this| (== the ancestorLayer argument to boundingBoxForCompositing).
+ // TODO(trchen): Layer fragmentation is inhibited across compositing boundary. Should we
+ // return the unfragmented bounds for overlap testing? Or perhaps assume fragmented layers
+ // always overlap?
return overlapBoundsIncludeChildren() ? boundingBoxForCompositing(this, NeverIncludeTransformForAncestorLayer) : fragmentsBoundingBox(this);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698