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

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

Issue 2743733004: Revert of Reduce copying of local data structures in GeometryMapper and PaintLayerClipper. (Closed)
Patch Set: Created 3 years, 9 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/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 1ab53d95b8ebf5c2ffe54fdb50e2e6c5f4de2839..439470c7a46c1a0ee9db1e1293e848e7ba853368 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1646,10 +1646,9 @@
overlayScrollbarClipBehavior);
if (respectOverflowClip == IgnoreOverflowClip)
clipRectsContext.setIgnoreOverflowClip();
-
- enclosingPaginationLayer()
- ->clipper(geometryMapperOption)
- .calculateBackgroundClipRect(clipRectsContext, ancestorClipRect);
+ ancestorClipRect = enclosingPaginationLayer()
+ ->clipper(geometryMapperOption)
+ .backgroundClipRect(clipRectsContext);
if (rootLayerIsInsidePaginationLayer)
ancestorClipRect.moveBy(
-rootLayer->visualOffsetFromAncestor(ancestorLayer));
@@ -1900,12 +1899,10 @@
// Make sure the parent's clip rects have been calculated.
if (parent()) {
- ClipRect clipRect;
- clipper(PaintLayer::DoNotUseGeometryMapper)
- .calculateBackgroundClipRect(
- ClipRectsContext(rootLayer, clipRectsCacheSlot,
- ExcludeOverlayScrollbarSizeForHitTesting),
- clipRect);
+ ClipRect clipRect = clipper(PaintLayer::DoNotUseGeometryMapper)
+ .backgroundClipRect(ClipRectsContext(
+ rootLayer, clipRectsCacheSlot,
+ ExcludeOverlayScrollbarSizeForHitTesting));
// Go ahead and test the enclosing clip now.
if (!clipRect.intersects(hitTestLocation))
return nullptr;
@@ -2144,17 +2141,15 @@
if (parent() != enclosingPaginationLayer()) {
enclosingPaginationLayer()->convertToLayerCoords(
rootLayer, offsetOfPaginationLayerFromRoot);
-
- ClipRect parentClipRect;
- clipper(PaintLayer::DoNotUseGeometryMapper)
- .calculateBackgroundClipRect(
- ClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot,
- ExcludeOverlayScrollbarSizeForHitTesting),
- parentClipRect);
-
+ LayoutRect parentClipRect =
+ clipper(PaintLayer::DoNotUseGeometryMapper)
+ .backgroundClipRect(ClipRectsContext(
+ enclosingPaginationLayer(), clipRectsCacheSlot,
+ ExcludeOverlayScrollbarSizeForHitTesting))
+ .rect();
parentClipRect.moveBy(fragment.paginationOffset +
offsetOfPaginationLayerFromRoot);
- clipRect.intersect(parentClipRect.rect());
+ clipRect.intersect(parentClipRect);
}
if (!hitTestLocation.intersects(clipRect))
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerClipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698