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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.h

Issue 2745563004: Reduce copying of local data structures in GeometryMapper and PaintLayerClipper. (Closed)
Patch Set: none 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/PaintLayerClipper.h
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.h b/third_party/WebKit/Source/core/paint/PaintLayerClipper.h
index 87d409de78d721b1c3e255034868a8dec739476f..61d860fc53be22cec7e8dd61108cd91a8a8ea6b0 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.h
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.h
@@ -183,7 +183,8 @@ class CORE_EXPORT PaintLayerClipper {
// Computes the same thing as backgroundRect in calculateRects(), but skips
// applying CSS clip and the visualOverflowRect() of |m_layer|.
- ClipRect backgroundClipRect(const ClipRectsContext&) const;
+ void calculateBackgroundClipRect(const ClipRectsContext&,
+ ClipRect& output) const;
// This method figures out our layerBounds in coordinates relative to
// |rootLayer|. It also computes our background and foreground clip rects
@@ -214,9 +215,10 @@ class CORE_EXPORT PaintLayerClipper {
bool shouldClipOverflow(const ClipRectsContext&) const;
bool shouldRespectOverflowClip(const ClipRectsContext&) const;
- // Returned clip rect is in the space of the context's rootLayer.
- ClipRect clipRectWithGeometryMapper(const ClipRectsContext&,
- bool isForeground) const;
+ // Returned clip rect in |output| is in the space of the context's rootLayer.
+ void calculateClipRectWithGeometryMapper(const ClipRectsContext&,
+ bool isForeground,
+ ClipRect& output) const;
// Mutates the given rect into a rect in the space of the context's
// rootLayer.
void mapLocalToRootWithGeometryMapper(const ClipRectsContext&,

Powered by Google App Engine
This is Rietveld 408576698