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

Unified Diff: Source/platform/graphics/paint/FloatClipDisplayItem.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/FloatClipDisplayItem.h
diff --git a/Source/platform/graphics/paint/FloatClipDisplayItem.h b/Source/platform/graphics/paint/FloatClipDisplayItem.h
index 6bb56e13ee52355ed990735b0e7e0d62cd6056aa..ddc0bf7c98054ddb130cb24a51bc31ef15273041 100644
--- a/Source/platform/graphics/paint/FloatClipDisplayItem.h
+++ b/Source/platform/graphics/paint/FloatClipDisplayItem.h
@@ -14,7 +14,7 @@ namespace blink {
class RoundedRect;
-class PLATFORM_EXPORT FloatClipDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT FloatClipDisplayItem : public PairedBeginDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<FloatClipDisplayItem> create(DisplayItemClient client, Type type, const FloatRect& clipRect)
@@ -23,7 +23,7 @@ public:
}
FloatClipDisplayItem(DisplayItemClient client, Type type, const FloatRect& clipRect)
- : DisplayItem(client, type)
+ : PairedBeginDisplayItem(client, type)
, m_clipRect(clipRect)
{
ASSERT(isFloatClipType(type));
@@ -40,7 +40,7 @@ private:
FloatRect m_clipRect;
};
-class PLATFORM_EXPORT EndFloatClipDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT EndFloatClipDisplayItem : public PairedEndDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<EndFloatClipDisplayItem> create(DisplayItemClient client, Type type)
@@ -49,13 +49,18 @@ public:
}
EndFloatClipDisplayItem(DisplayItemClient client, Type type)
- : DisplayItem(client, type)
+ : PairedEndDisplayItem(client, type)
{
ASSERT(isEndFloatClipType(type));
}
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.isFloatClip(); }
+#endif
};
} // namespace blink
« no previous file with comments | « Source/platform/graphics/paint/FilterDisplayItem.cpp ('k') | Source/platform/graphics/paint/ScrollDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698