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 Transform3DDisplayItem_h | 5 #ifndef Transform3DDisplayItem_h |
6 #define Transform3DDisplayItem_h | 6 #define Transform3DDisplayItem_h |
7 | 7 |
8 #include "platform/graphics/paint/DisplayItem.h" | 8 #include "platform/graphics/paint/DisplayItem.h" |
9 #include "platform/transforms/TransformationMatrix.h" | 9 #include "platform/transforms/TransformationMatrix.h" |
10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 BeginTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayI
tem::Type type, const TransformationMatrix& transform) | 23 BeginTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayI
tem::Type type, const TransformationMatrix& transform) |
24 : PairedBeginDisplayItem(client, type) | 24 : PairedBeginDisplayItem(client, type) |
25 , m_transform(transform) | 25 , m_transform(transform) |
26 { | 26 { |
27 ASSERT(DisplayItem::isTransform3DType(type)); | 27 ASSERT(DisplayItem::isTransform3DType(type)); |
28 } | 28 } |
29 | 29 |
30 virtual void replay(GraphicsContext&) override; | 30 virtual void replay(GraphicsContext&) override; |
31 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 31 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 32 virtual void appendByMoving(DisplayItems&) override; |
32 | 33 |
33 const TransformationMatrix& transform() const { return m_transform; } | 34 const TransformationMatrix& transform() const { return m_transform; } |
34 | 35 |
35 private: | 36 private: |
36 const TransformationMatrix m_transform; | 37 const TransformationMatrix m_transform; |
37 FloatPoint3D m_transformOrigin; | 38 FloatPoint3D m_transformOrigin; |
38 }; | 39 }; |
39 | 40 |
40 class PLATFORM_EXPORT EndTransform3DDisplayItem : public PairedEndDisplayItem { | 41 class PLATFORM_EXPORT EndTransform3DDisplayItem : public PairedEndDisplayItem { |
41 WTF_MAKE_FAST_ALLOCATED(EndTransform3DDisplayItem); | 42 WTF_MAKE_FAST_ALLOCATED(EndTransform3DDisplayItem); |
42 public: | 43 public: |
43 static PassOwnPtr<EndTransform3DDisplayItem> create(const DisplayItemClientW
rapper& client, DisplayItem::Type type) | 44 static PassOwnPtr<EndTransform3DDisplayItem> create(const DisplayItemClientW
rapper& client, DisplayItem::Type type) |
44 { | 45 { |
45 return adoptPtr(new EndTransform3DDisplayItem(client, type)); | 46 return adoptPtr(new EndTransform3DDisplayItem(client, type)); |
46 } | 47 } |
47 | 48 |
48 EndTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayIte
m::Type type) | 49 EndTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayIte
m::Type type) |
49 : PairedEndDisplayItem(client, type) | 50 : PairedEndDisplayItem(client, type) |
50 { | 51 { |
51 ASSERT(DisplayItem::isEndTransform3DType(type)); | 52 ASSERT(DisplayItem::isEndTransform3DType(type)); |
52 } | 53 } |
53 | 54 |
54 virtual void replay(GraphicsContext&) override; | 55 virtual void replay(GraphicsContext&) override; |
55 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 56 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 57 virtual void appendByMoving(DisplayItems&) override; |
56 | 58 |
57 private: | 59 private: |
58 #if ENABLE(ASSERT) | 60 #if ENABLE(ASSERT) |
59 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final | 61 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final |
60 { | 62 { |
61 return DisplayItem::transform3DTypeToEndTransform3DType(otherType) == ty
pe(); | 63 return DisplayItem::transform3DTypeToEndTransform3DType(otherType) == ty
pe(); |
62 } | 64 } |
63 #endif | 65 #endif |
64 }; | 66 }; |
65 | 67 |
66 } // namespace blink | 68 } // namespace blink |
67 | 69 |
68 #endif // Transform3DDisplayItem_h | 70 #endif // Transform3DDisplayItem_h |
OLD | NEW |