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

Unified Diff: Source/platform/graphics/paint/ClipDisplayItem.h

Issue 1203343002: WIP for display item list backed by ListContainer Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/platform/graphics/paint/ClipDisplayItem.h
diff --git a/Source/platform/graphics/paint/ClipDisplayItem.h b/Source/platform/graphics/paint/ClipDisplayItem.h
index 65c2754a49998a4ca2ec0a0e53851cdc10ecee6a..ccc14f82213e15aa1e077dd5d5d9a249bb76147c 100644
--- a/Source/platform/graphics/paint/ClipDisplayItem.h
+++ b/Source/platform/graphics/paint/ClipDisplayItem.h
@@ -16,19 +16,12 @@
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, PassOwnPtr<Vector<FloatRoundedRect>> roundedRectClips = nullptr)
+ void setNew(IntRect& clipRect, PassOwnPtr<Vector<FloatRoundedRect>> roundedRectClips = nullptr)
{
- return adoptPtr(new ClipDisplayItem(client, type, clipRect, roundedRectClips));
- }
-
- ClipDisplayItem(const DisplayItemClientWrapper& client, Type type, const IntRect& clipRect, PassOwnPtr<Vector<FloatRoundedRect>> roundedRectClips = nullptr)
- : PairedBeginDisplayItem(client, type)
- , m_clipRect(clipRect)
- , m_roundedRectClips(roundedRectClips)
- {
- ASSERT(isClipType(type));
+ m_clipRect = clipRect;
+ m_roundedRectClips = roundedRectClips;
+ ASSERT(isClipType(type()));
}
virtual void replay(GraphicsContext&) override;
@@ -43,19 +36,7 @@ private:
};
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)
- {
- ASSERT(isEndClipType(type));
- }
-
virtual void replay(GraphicsContext&) override;
virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
« no previous file with comments | « Source/platform/graphics/paint/CachedDisplayItem.h ('k') | Source/platform/graphics/paint/ClipPathDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698