Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CompositingDisplayItem_h | 5 #ifndef CompositingDisplayItem_h |
| 6 #define CompositingDisplayItem_h | 6 #define CompositingDisplayItem_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatRect.h" | 8 #include "platform/geometry/FloatRect.h" |
| 9 #include "platform/graphics/GraphicsTypes.h" | 9 #include "platform/graphics/GraphicsTypes.h" |
| 10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 , m_opacity(opacity) | 23 , m_opacity(opacity) |
| 24 , m_hasBounds(bounds) | 24 , m_hasBounds(bounds) |
| 25 , m_colorFilter(colorFilter) | 25 , m_colorFilter(colorFilter) |
| 26 { | 26 { |
| 27 if (bounds) | 27 if (bounds) |
| 28 m_bounds = FloatRect(*bounds); | 28 m_bounds = FloatRect(*bounds); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void replay(GraphicsContext&) const override; | 31 void replay(GraphicsContext&) const override; |
| 32 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride; | 32 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride; |
| 33 bool isBeginCompositingDisplayItem() const final { return true; } | |
|
f(malita)
2016/07/26 19:03:15
Nit: 'final' is redundant (class is final).
chrishtr
2016/07/26 19:54:24
Acknowledged.
| |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 #ifndef NDEBUG | 36 #ifndef NDEBUG |
| 36 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override; | 37 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override; |
| 37 #endif | 38 #endif |
| 38 #if ENABLE(ASSERT) | 39 #if ENABLE(ASSERT) |
| 39 bool equals(const DisplayItem& other) const final | 40 bool equals(const DisplayItem& other) const final |
| 40 { | 41 { |
| 41 return DisplayItem::equals(other) | 42 return DisplayItem::equals(other) |
| 42 && m_xferMode == static_cast<const BeginCompositingDisplayItem&>(oth er).m_xferMode | 43 && m_xferMode == static_cast<const BeginCompositingDisplayItem&>(oth er).m_xferMode |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 #if ENABLE(ASSERT) | 67 #if ENABLE(ASSERT) |
| 67 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginCompositing; } | 68 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginCompositing; } |
| 68 #endif | 69 #endif |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace blink | 72 } // namespace blink |
| 72 | 73 |
| 73 #endif // CompositingDisplayItem_h | 74 #endif // CompositingDisplayItem_h |
| OLD | NEW |