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

Side by Side 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: Rebase Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SubsequenceDisplayItem_h 5 #ifndef SubsequenceDisplayItem_h
6 #define SubsequenceDisplayItem_h 6 #define SubsequenceDisplayItem_h
7 7
8 #include "platform/geometry/FloatRect.h" 8 #include "platform/geometry/FloatRect.h"
9 #include "platform/graphics/paint/DisplayItem.h" 9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class BeginSubsequenceDisplayItem final : public PairedBeginDisplayItem { 14 class BeginSubsequenceDisplayItem final : public PairedBeginDisplayItem {
15 public: 15 public:
16 BeginSubsequenceDisplayItem(const DisplayItemClientWrapper& client) 16 BeginSubsequenceDisplayItem(const DisplayItemClientWrapper& client, DisplayI tem::Type type)
17 : PairedBeginDisplayItem(client, BeginSubsequence, sizeof(*this)) 17 : PairedBeginDisplayItem(client, type, sizeof(*this))
18 { } 18 {
19 ASSERT(DisplayItem::isSubsequenceType(type));
20 }
19 }; 21 };
20 22
21 class EndSubsequenceDisplayItem final : public PairedEndDisplayItem { 23 class EndSubsequenceDisplayItem final : public PairedEndDisplayItem {
22 public: 24 public:
23 EndSubsequenceDisplayItem(const DisplayItemClientWrapper& client) 25 EndSubsequenceDisplayItem(const DisplayItemClientWrapper& client, DisplayIte m::Type type)
24 : PairedEndDisplayItem(client, EndSubsequence, sizeof(*this)) 26 : PairedEndDisplayItem(client, type, sizeof(*this))
25 { } 27 {
28 ASSERT(DisplayItem::isEndSubsequenceType(type));
29 }
26 30
27 #if ENABLE(ASSERT) 31 #if ENABLE(ASSERT)
28 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginSubsequence; } 32 bool isEndAndPairedWith(DisplayItem::Type otherType) const final
33 {
34 return otherType == DisplayItem::endSubsequenceTypeToSubsequenceType(typ e());
35 }
29 #endif 36 #endif
30 }; 37 };
31 38
32 } // namespace blink 39 } // namespace blink
33 40
34 #endif // SubsequenceDisplayItem_h 41 #endif // SubsequenceDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698