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

Unified Diff: Source/platform/graphics/paint/TransformDisplayItem.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
« no previous file with comments | « Source/platform/graphics/paint/Transform3DDisplayItem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/TransformDisplayItem.h
diff --git a/Source/platform/graphics/paint/TransformDisplayItem.h b/Source/platform/graphics/paint/TransformDisplayItem.h
index 6e3ce30317ef539259184a1e5ba4407b209a9e3b..b801fcf41326efcbf545544dd9da4a4fab9a71fc 100644
--- a/Source/platform/graphics/paint/TransformDisplayItem.h
+++ b/Source/platform/graphics/paint/TransformDisplayItem.h
@@ -11,7 +11,7 @@
namespace blink {
-class PLATFORM_EXPORT BeginTransformDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT BeginTransformDisplayItem : public PairedBeginDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<BeginTransformDisplayItem> create(DisplayItemClient client, const AffineTransform& transform)
@@ -20,7 +20,7 @@ public:
}
BeginTransformDisplayItem(DisplayItemClient client, const AffineTransform& transform)
- : DisplayItem(client, BeginTransform)
+ : PairedBeginDisplayItem(client, BeginTransform)
, m_transform(transform) { }
virtual void replay(GraphicsContext*) override;
@@ -30,7 +30,7 @@ private:
const AffineTransform m_transform;
};
-class PLATFORM_EXPORT EndTransformDisplayItem : public DisplayItem {
+class PLATFORM_EXPORT EndTransformDisplayItem : public PairedEndDisplayItem {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<EndTransformDisplayItem> create(DisplayItemClient client)
@@ -39,10 +39,15 @@ public:
}
EndTransformDisplayItem(DisplayItemClient client)
- : DisplayItem(client, EndTransform) { }
+ : PairedEndDisplayItem(client, EndTransform) { }
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() == BeginTransform; }
+#endif
};
} // namespace blink
« no previous file with comments | « Source/platform/graphics/paint/Transform3DDisplayItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698