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

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

Issue 1375393002: Output subsequence for children layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix blink_platform_unittests and address pdr's comments Created 5 years, 3 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: third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h
index fda7a832b1d09ea3745666f113e39379cd2e1f7a..dc7f45138bdf87597e6238b4d445cd73d543d311 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceDisplayItem.h
@@ -13,19 +13,26 @@ namespace blink {
class BeginSubsequenceDisplayItem final : public PairedBeginDisplayItem {
public:
- BeginSubsequenceDisplayItem(const DisplayItemClientWrapper& client)
- : PairedBeginDisplayItem(client, BeginSubsequence, sizeof(*this))
- { }
+ BeginSubsequenceDisplayItem(const DisplayItemClientWrapper& client, DisplayItem::Type type)
+ : PairedBeginDisplayItem(client, type, sizeof(*this))
+ {
+ ASSERT(DisplayItem::isSubsequenceType(type));
+ }
};
class EndSubsequenceDisplayItem final : public PairedEndDisplayItem {
public:
- EndSubsequenceDisplayItem(const DisplayItemClientWrapper& client)
- : PairedEndDisplayItem(client, EndSubsequence, sizeof(*this))
- { }
+ EndSubsequenceDisplayItem(const DisplayItemClientWrapper& client, DisplayItem::Type type)
+ : PairedEndDisplayItem(client, type, sizeof(*this))
+ {
+ ASSERT(DisplayItem::isEndSubsequenceType(type));
+ }
#if ENABLE(ASSERT)
- bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return otherType == BeginSubsequence; }
+ bool isEndAndPairedWith(DisplayItem::Type otherType) const final
+ {
+ return otherType == DisplayItem::endSubsequenceTypeToSubsequenceType(type());
+ }
#endif
};

Powered by Google App Engine
This is Rietveld 408576698