| Index: Source/platform/graphics/paint/ClipDisplayItem.h
|
| diff --git a/Source/platform/graphics/paint/ClipDisplayItem.h b/Source/platform/graphics/paint/ClipDisplayItem.h
|
| index c065f0ec061a36dc84478545fc7df2eb362935a6..65d619cfcf1a884b694e6fd36ec7787069d47a8d 100644
|
| --- a/Source/platform/graphics/paint/ClipDisplayItem.h
|
| +++ b/Source/platform/graphics/paint/ClipDisplayItem.h
|
| @@ -16,43 +16,41 @@
|
| namespace blink {
|
|
|
| class PLATFORM_EXPORT ClipDisplayItem : public PairedBeginDisplayItem {
|
| - WTF_MAKE_FAST_ALLOCATED(ClipDisplayItem);
|
| public:
|
| - static PassOwnPtr<ClipDisplayItem> create(const DisplayItemClientWrapper& client, Type type, const IntRect& clipRect, SkRegion::Op operation = SkRegion::kIntersect_Op)
|
| - {
|
| - return adoptPtr(new ClipDisplayItem(client, type, clipRect, operation));
|
| - }
|
| -
|
| - ClipDisplayItem(const DisplayItemClientWrapper& client, Type type, const IntRect& clipRect, SkRegion::Op operation = SkRegion::kIntersect_Op)
|
| + ClipDisplayItem(const DisplayItemClientWrapper& client, Type type, const IntRect& clipRect, PassOwnPtr<Vector<FloatRoundedRect>> roundedRectClips)
|
| : PairedBeginDisplayItem(client, type)
|
| , m_clipRect(clipRect)
|
| - , m_operation(operation)
|
| + , m_roundedRectClips(roundedRectClips)
|
| {
|
| ASSERT(isClipType(type));
|
| }
|
|
|
| + ClipDisplayItem(const DisplayItemClientWrapper& client, Type type, const IntRect& clipRect, FloatRoundedRect roundedRectClip)
|
| + : ClipDisplayItem(client, type, clipRect, adoptPtr(new Vector<FloatRoundedRect>()))
|
| + {
|
| + m_roundedRectClips->append(roundedRectClip);
|
| + }
|
| +
|
| + ClipDisplayItem(const DisplayItemClientWrapper& client, Type type, const IntRect& clipRect)
|
| + : ClipDisplayItem(client, type, clipRect, nullptr)
|
| + {
|
| + }
|
| +
|
| virtual void replay(GraphicsContext&) override;
|
| virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
|
| -
|
| - Vector<FloatRoundedRect>& roundedRectClips() { return m_roundedRectClips; }
|
| + void appendByMoving(DisplayItems&) override;
|
|
|
| private:
|
| #ifndef NDEBUG
|
| virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
|
| #endif
|
| IntRect m_clipRect;
|
| - Vector<FloatRoundedRect> m_roundedRectClips;
|
| - SkRegion::Op m_operation;
|
| + OwnPtr<Vector<FloatRoundedRect>> m_roundedRectClips;
|
| + // TODO(pdr): Track SkRegion::Op.
|
| };
|
|
|
| class PLATFORM_EXPORT EndClipDisplayItem : public PairedEndDisplayItem {
|
| - WTF_MAKE_FAST_ALLOCATED(EndClipDisplayItem);
|
| public:
|
| - static PassOwnPtr<EndClipDisplayItem> create(const DisplayItemClientWrapper& client, Type type)
|
| - {
|
| - return adoptPtr(new EndClipDisplayItem(client, type));
|
| - }
|
| -
|
| EndClipDisplayItem(const DisplayItemClientWrapper& client, Type type)
|
| : PairedEndDisplayItem(client, type)
|
| {
|
| @@ -61,6 +59,7 @@ public:
|
|
|
| virtual void replay(GraphicsContext&) override;
|
| virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
|
| + void appendByMoving(DisplayItems&) override;
|
|
|
| private:
|
| #if ENABLE(ASSERT)
|
|
|