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

Unified Diff: Source/core/paint/LayerClipRecorder.cpp

Issue 1192363005: Move all clip display item parameters to the constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 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 | « Source/core/paint/BoxClipper.cpp ('k') | Source/core/paint/RoundedInnerRectClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/LayerClipRecorder.cpp
diff --git a/Source/core/paint/LayerClipRecorder.cpp b/Source/core/paint/LayerClipRecorder.cpp
index 8ed407eb3a00945912f0a74413a992922bf1cfe9..899e41bf934cd5a572b6335fef92cb2d26aa0862 100644
--- a/Source/core/paint/LayerClipRecorder.cpp
+++ b/Source/core/paint/LayerClipRecorder.cpp
@@ -24,9 +24,13 @@ LayerClipRecorder::LayerClipRecorder(GraphicsContext& graphicsContext, const Lay
, m_clipType(clipType)
{
IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
- OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(layoutObject, clipType, snappedClipRect);
- if (localPaintingInfo && clipRect.hasRadius())
- collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo, graphicsContext, fragmentOffset, paintFlags, rule, clipDisplayItem->roundedRectClips());
+ OwnPtr<Vector<FloatRoundedRect>> roundedRects;
+ if (localPaintingInfo && clipRect.hasRadius()) {
+ roundedRects = adoptPtr(new Vector<FloatRoundedRect>());
+ collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo, graphicsContext, fragmentOffset, paintFlags, rule, *roundedRects);
+ }
+
+ OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(layoutObject, clipType, snappedClipRect, roundedRects.release());
if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) {
clipDisplayItem->replay(graphicsContext);
} else {
« no previous file with comments | « Source/core/paint/BoxClipper.cpp ('k') | Source/core/paint/RoundedInnerRectClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698