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

Unified Diff: Source/platform/graphics/paint/FilterDisplayItem.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/FilterDisplayItem.h
diff --git a/Source/platform/graphics/paint/FilterDisplayItem.h b/Source/platform/graphics/paint/FilterDisplayItem.h
index 185324d5357409a044eb41bdf97390b3e10e0345..231140d909c4dc5a2cfbcb8565ab497c00a2edf1 100644
--- a/Source/platform/graphics/paint/FilterDisplayItem.h
+++ b/Source/platform/graphics/paint/FilterDisplayItem.h
@@ -18,7 +18,7 @@
namespace blink {
-class PLATFORM_EXPORT BeginFilterDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT BeginFilterDisplayItem : public PairedBeginDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<BeginFilterDisplayItem> create(DisplayItemClient client, PassRefPtr<ImageFilter> imageFilter, const LayoutRect& bounds)
@@ -48,7 +48,7 @@ private:
const LayoutRect m_bounds;
};
-class PLATFORM_EXPORT EndFilterDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT EndFilterDisplayItem : public PairedEndDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<EndFilterDisplayItem> create(DisplayItemClient client)
@@ -57,10 +57,15 @@ public:
}
EndFilterDisplayItem(DisplayItemClient client)
- : DisplayItem(client, EndFilter) { }
+ : PairedEndDisplayItem(client, EndFilter) { }
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() == BeginFilter; }
+#endif
};
}
« no previous file with comments | « Source/platform/graphics/paint/DisplayItemList.cpp ('k') | Source/platform/graphics/paint/FilterDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698