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 19 matching lines...) Expand all Loading... |
30 , m_opacity(opacity) | 30 , m_opacity(opacity) |
31 , m_hasBounds(bounds) | 31 , m_hasBounds(bounds) |
32 , m_colorFilter(colorFilter) | 32 , m_colorFilter(colorFilter) |
33 { | 33 { |
34 if (bounds) | 34 if (bounds) |
35 m_bounds = FloatRect(*bounds); | 35 m_bounds = FloatRect(*bounds); |
36 } | 36 } |
37 | 37 |
38 virtual void replay(GraphicsContext&) override; | 38 virtual void replay(GraphicsContext&) override; |
39 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 39 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 40 virtual void appendByMoving(DisplayItems&) override; |
40 | 41 |
41 private: | 42 private: |
42 #ifndef NDEBUG | 43 #ifndef NDEBUG |
43 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override
; | 44 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override
; |
44 #endif | 45 #endif |
45 const SkXfermode::Mode m_xferMode; | 46 const SkXfermode::Mode m_xferMode; |
46 const float m_opacity; | 47 const float m_opacity; |
47 bool m_hasBounds; | 48 bool m_hasBounds; |
48 FloatRect m_bounds; | 49 FloatRect m_bounds; |
49 ColorFilter m_colorFilter; | 50 ColorFilter m_colorFilter; |
50 }; | 51 }; |
51 | 52 |
52 class PLATFORM_EXPORT EndCompositingDisplayItem : public PairedEndDisplayItem { | 53 class PLATFORM_EXPORT EndCompositingDisplayItem : public PairedEndDisplayItem { |
53 WTF_MAKE_FAST_ALLOCATED(EndCompositingDisplayItem); | 54 WTF_MAKE_FAST_ALLOCATED(EndCompositingDisplayItem); |
54 public: | 55 public: |
55 static PassOwnPtr<EndCompositingDisplayItem> create(const DisplayItemClientW
rapper& client) | 56 static PassOwnPtr<EndCompositingDisplayItem> create(const DisplayItemClientW
rapper& client) |
56 { | 57 { |
57 return adoptPtr(new EndCompositingDisplayItem(client)); | 58 return adoptPtr(new EndCompositingDisplayItem(client)); |
58 } | 59 } |
59 | 60 |
60 EndCompositingDisplayItem(const DisplayItemClientWrapper& client) | 61 EndCompositingDisplayItem(const DisplayItemClientWrapper& client) |
61 : PairedEndDisplayItem(client, EndCompositing) { } | 62 : PairedEndDisplayItem(client, EndCompositing) { } |
62 | 63 |
63 virtual void replay(GraphicsContext&) override; | 64 virtual void replay(GraphicsContext&) override; |
64 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 65 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 66 virtual void appendByMoving(DisplayItems&) override; |
65 | 67 |
66 private: | 68 private: |
67 #if ENABLE(ASSERT) | 69 #if ENABLE(ASSERT) |
68 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final { return otherType == BeginCompositing; } | 70 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final { return otherType == BeginCompositing; } |
69 #endif | 71 #endif |
70 }; | 72 }; |
71 | 73 |
72 } // namespace blink | 74 } // namespace blink |
73 | 75 |
74 #endif // CompositingDisplayItem_h | 76 #endif // CompositingDisplayItem_h |
OLD | NEW |