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

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

Issue 900653003: Avoid empty display item pairs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix try bot breakage Created 5 years, 10 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/ClipPathDisplayItem.h
diff --git a/Source/platform/graphics/paint/ClipPathDisplayItem.h b/Source/platform/graphics/paint/ClipPathDisplayItem.h
index 6f156c7e431eb6cbf83e2dda438f4213c6bba755..e41c9bf8281889266ab22728116537c86f1e6879 100644
--- a/Source/platform/graphics/paint/ClipPathDisplayItem.h
+++ b/Source/platform/graphics/paint/ClipPathDisplayItem.h
@@ -12,7 +12,7 @@
namespace blink {
-class PLATFORM_EXPORT BeginClipPathDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT BeginClipPathDisplayItem : public PairedBeginDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<BeginClipPathDisplayItem> create(DisplayItemClient client, const Path& clipPath, WindRule windRule)
@@ -21,7 +21,7 @@ public:
}
BeginClipPathDisplayItem(DisplayItemClient client, const Path& clipPath, WindRule windRule)
- : DisplayItem(client, BeginClipPath)
+ : PairedBeginDisplayItem(client, BeginClipPath)
, m_clipPath(clipPath)
, m_windRule(windRule) { }
@@ -36,7 +36,7 @@ private:
#endif
};
-class PLATFORM_EXPORT EndClipPathDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT EndClipPathDisplayItem : public PairedEndDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<EndClipPathDisplayItem> create(DisplayItemClient client)
@@ -45,10 +45,15 @@ public:
}
EndClipPathDisplayItem(DisplayItemClient client)
- : DisplayItem(client, EndClipPath) { }
+ : PairedEndDisplayItem(client, EndClipPath) { }
virtual void replay(GraphicsContext*) override;
virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
+
+private:
+#if ENABLE(ASSERT)
+ virtual bool isEndAndPairedWith(const DisplayItem& other) const override final { return other.type() == BeginClipPath; }
+#endif
};
} // namespace blink
« no previous file with comments | « Source/platform/graphics/paint/ClipDisplayItem.h ('k') | Source/platform/graphics/paint/CompositingDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698