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

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

Issue 1313223002: Simplify subtree (now subsequence) caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Subtree => Subsequence Created 5 years, 4 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/SubsequenceDisplayItem.h
diff --git a/Source/platform/graphics/paint/SubsequenceDisplayItem.h b/Source/platform/graphics/paint/SubsequenceDisplayItem.h
new file mode 100644
index 0000000000000000000000000000000000000000..fda7a832b1d09ea3745666f113e39379cd2e1f7a
--- /dev/null
+++ b/Source/platform/graphics/paint/SubsequenceDisplayItem.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SubsequenceDisplayItem_h
+#define SubsequenceDisplayItem_h
+
+#include "platform/geometry/FloatRect.h"
+#include "platform/graphics/paint/DisplayItem.h"
+#include "wtf/Assertions.h"
+
+namespace blink {
+
+class BeginSubsequenceDisplayItem final : public PairedBeginDisplayItem {
+public:
+ BeginSubsequenceDisplayItem(const DisplayItemClientWrapper& client)
+ : PairedBeginDisplayItem(client, BeginSubsequence, sizeof(*this))
+ { }
+};
+
+class EndSubsequenceDisplayItem final : public PairedEndDisplayItem {
+public:
+ EndSubsequenceDisplayItem(const DisplayItemClientWrapper& client)
+ : PairedEndDisplayItem(client, EndSubsequence, sizeof(*this))
+ { }
+
+#if ENABLE(ASSERT)
+ bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return otherType == BeginSubsequence; }
+#endif
+};
+
+} // namespace blink
+
+#endif // SubsequenceDisplayItem_h

Powered by Google App Engine
This is Rietveld 408576698