| Index: third_party/WebKit/Source/platform/graphics/paint/ClipDisplayItem.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/ClipDisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/ClipDisplayItem.cpp
|
| index 357e1f7bb5b06666d9dc8610a0dab9eecff518ee..75a305bfdb9358b3d288b1650c9c7911e3306c71 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/ClipDisplayItem.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/ClipDisplayItem.cpp
|
| @@ -14,7 +14,13 @@ namespace blink {
|
| void ClipDisplayItem::replay(GraphicsContext& context) const
|
| {
|
| context.save();
|
| - context.clipRect(m_clipRect, AntiAliased);
|
| +
|
| + // RoundedInnerRectClipper only cares about rounded-rect clips,
|
| + // and passes an "infinite" rect clip; there is no reason to apply this clip.
|
| + // TODO(fmalita): convert RoundedInnerRectClipper to a better suited
|
| + // DisplayItem so we don't have to special-case its semantics.
|
| + if (m_clipRect != LayoutRect::infiniteIntRect())
|
| + context.clipRect(m_clipRect, AntiAliased);
|
|
|
| for (const FloatRoundedRect& roundedRect : m_roundedRectClips)
|
| context.clipRoundedRect(roundedRect);
|
| @@ -23,21 +29,9 @@ void ClipDisplayItem::replay(GraphicsContext& context) const
|
| void ClipDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, WebDisplayItemList* list) const
|
| {
|
| WebVector<SkRRect> webRoundedRects(m_roundedRectClips.size());
|
| - for (size_t i = 0; i < m_roundedRectClips.size(); ++i) {
|
| - FloatRoundedRect::Radii rectRadii = m_roundedRectClips[i].getRadii();
|
| - SkVector skRadii[4];
|
| - skRadii[SkRRect::kUpperLeft_Corner].set(SkIntToScalar(rectRadii.topLeft().width()),
|
| - SkIntToScalar(rectRadii.topLeft().height()));
|
| - skRadii[SkRRect::kUpperRight_Corner].set(SkIntToScalar(rectRadii.topRight().width()),
|
| - SkIntToScalar(rectRadii.topRight().height()));
|
| - skRadii[SkRRect::kLowerRight_Corner].set(SkIntToScalar(rectRadii.bottomRight().width()),
|
| - SkIntToScalar(rectRadii.bottomRight().height()));
|
| - skRadii[SkRRect::kLowerLeft_Corner].set(SkIntToScalar(rectRadii.bottomLeft().width()),
|
| - SkIntToScalar(rectRadii.bottomLeft().height()));
|
| - SkRRect skRoundedRect;
|
| - skRoundedRect.setRectRadii(m_roundedRectClips[i].rect(), skRadii);
|
| - webRoundedRects[i] = skRoundedRect;
|
| - }
|
| + for (size_t i = 0; i < m_roundedRectClips.size(); ++i)
|
| + webRoundedRects[i] = m_roundedRectClips[i];
|
| +
|
| list->appendClipItem(visualRect, m_clipRect, webRoundedRects);
|
| }
|
|
|
|
|