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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2802443002: Compute rounded-ness of visual rects (Closed)
Patch Set: none Created 3 years, 8 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/platform/graphics/compositing/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index 98dec728113c1b5dfd767de39b560e9c62a8de8b..c9a96c9d1a7b99bef2c3fbaa99f03db6e39654dd 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -357,11 +357,11 @@ void PaintArtifactCompositor::PendingLayer::merge(const PendingLayer& guest) {
DCHECK_EQ(backfaceHidden, guest.backfaceHidden);
paintChunks.appendVector(guest.paintChunks);
- FloatRect guestBoundsInHome = guest.bounds;
+ FloatClipRect guestBoundsInHome(guest.bounds);
GeometryMapper::localToAncestorVisualRect(
guest.propertyTreeState, propertyTreeState, guestBoundsInHome);
FloatRect oldBounds = bounds;
- bounds.unite(guestBoundsInHome);
+ bounds.unite(guestBoundsInHome.rect());
if (bounds != oldBounds)
knownToBeOpaque = false;
// TODO(crbug.com/701991): Upgrade GeometryMapper.
@@ -385,8 +385,10 @@ bool PaintArtifactCompositor::PendingLayer::canMerge(
void PaintArtifactCompositor::PendingLayer::upcast(
const PropertyTreeState& newState) {
DCHECK(!isForeign);
+ FloatClipRect floatClipRect(bounds);
GeometryMapper::localToAncestorVisualRect(propertyTreeState, newState,
- bounds);
+ floatClipRect);
+ bounds = floatClipRect.rect();
propertyTreeState = newState;
// TODO(crbug.com/701991): Upgrade GeometryMapper.
@@ -453,14 +455,14 @@ bool PaintArtifactCompositor::mightOverlap(const PendingLayer& layerA,
ClipPaintPropertyNode::root(),
EffectPaintPropertyNode::root());
- FloatRect boundsA = layerA.bounds;
+ FloatClipRect boundsA(layerA.bounds);
GeometryMapper::localToAncestorVisualRect(layerA.propertyTreeState,
rootPropertyTreeState, boundsA);
- FloatRect boundsB = layerB.bounds;
+ FloatClipRect boundsB(layerB.bounds);
GeometryMapper::localToAncestorVisualRect(layerB.propertyTreeState,
rootPropertyTreeState, boundsB);
- return boundsA.intersects(boundsB);
+ return boundsA.rect().intersects(boundsB.rect());
}
bool PaintArtifactCompositor::canDecompositeEffect(

Powered by Google App Engine
This is Rietveld 408576698