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

Unified Diff: Source/core/paint/BoxClipper.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 | « no previous file | Source/core/paint/LayerClipRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxClipper.cpp
diff --git a/Source/core/paint/BoxClipper.cpp b/Source/core/paint/BoxClipper.cpp
index ce1de5652c9232df953bec572020b00fd471b139..ab8c1578dd6258f1b296ce4d2852ca22e5bba215 100644
--- a/Source/core/paint/BoxClipper.cpp
+++ b/Source/core/paint/BoxClipper.cpp
@@ -52,14 +52,15 @@ BoxClipper::BoxClipper(LayoutBox& box, const PaintInfo& paintInfo, const LayoutP
return;
}
- if (RuntimeEnabledFeatures::slimmingPaintEnabled())
- m_clipType = m_paintInfo.displayItemTypeForClipping();
-
- OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(m_box, m_clipType, pixelSnappedIntRect(clipRect));
- if (hasBorderRadius)
- clipDisplayItem->roundedRectClips().append(clipRoundedRect);
+ OwnPtr<Vector<FloatRoundedRect>> roundedRects;
+ if (hasBorderRadius) {
+ roundedRects = adoptPtr(new Vector<FloatRoundedRect>());
+ roundedRects->append(clipRoundedRect);
+ }
+ OwnPtr<ClipDisplayItem> clipDisplayItem = ClipDisplayItem::create(m_box, m_clipType, pixelSnappedIntRect(clipRect), roundedRects.release());
if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ m_clipType = m_paintInfo.displayItemTypeForClipping();
ASSERT(m_paintInfo.context->displayItemList());
if (!m_paintInfo.context->displayItemList()->displayItemConstructionIsDisabled())
m_paintInfo.context->displayItemList()->add(clipDisplayItem.release());
« no previous file with comments | « no previous file | Source/core/paint/LayerClipRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698