OLD | NEW |
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 DisplayItemClient& client) |
17 : PairedBeginDisplayItem(client, Subsequence, sizeof(*this)) | 17 : PairedBeginDisplayItem(client, Subsequence, sizeof(*this)) |
18 { } | 18 { } |
19 }; | 19 }; |
20 | 20 |
21 class EndSubsequenceDisplayItem final : public PairedEndDisplayItem { | 21 class EndSubsequenceDisplayItem final : public PairedEndDisplayItem { |
22 public: | 22 public: |
23 EndSubsequenceDisplayItem(const DisplayItemClientWrapper& client) | 23 EndSubsequenceDisplayItem(const DisplayItemClient& client) |
24 : PairedEndDisplayItem(client, EndSubsequence, sizeof(*this)) | 24 : PairedEndDisplayItem(client, EndSubsequence, sizeof(*this)) |
25 { } | 25 { } |
26 | 26 |
27 #if ENABLE(ASSERT) | 27 #if ENABLE(ASSERT) |
28 bool isEndAndPairedWith(DisplayItem::Type otherType) const final | 28 bool isEndAndPairedWith(DisplayItem::Type otherType) const final |
29 { | 29 { |
30 return type() == EndSubsequence && otherType == Subsequence; | 30 return type() == EndSubsequence && otherType == Subsequence; |
31 } | 31 } |
32 #endif | 32 #endif |
33 }; | 33 }; |
34 | 34 |
35 } // namespace blink | 35 } // namespace blink |
36 | 36 |
37 #endif // SubsequenceDisplayItem_h | 37 #endif // SubsequenceDisplayItem_h |
OLD | NEW |