| 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 TransformDisplayItem_h | 5 #ifndef TransformDisplayItem_h |
| 6 #define TransformDisplayItem_h | 6 #define TransformDisplayItem_h |
| 7 | 7 |
| 8 #include "platform/graphics/paint/DisplayItem.h" | 8 #include "platform/graphics/paint/DisplayItem.h" |
| 9 #include "platform/transforms/AffineTransform.h" | 9 #include "platform/transforms/AffineTransform.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class PLATFORM_EXPORT BeginTransformDisplayItem : public DisplayItem { | 14 class PLATFORM_EXPORT BeginTransformDisplayItem : public DisplayItem { |
| 15 public: | 15 public: |
| 16 static PassOwnPtr<BeginTransformDisplayItem> create(DisplayItemClient client
, const AffineTransform& transform) { return adoptPtr(new BeginTransformDisplayI
tem(client, transform)); } | 16 static PassOwnPtr<BeginTransformDisplayItem> create(DisplayItemClient client
, const AffineTransform& transform) { return adoptPtr(new BeginTransformDisplayI
tem(client, transform)); } |
| 17 | 17 |
| 18 virtual void replay(GraphicsContext*) override; | 18 virtual void replay(GraphicsContext*) override; |
| 19 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 19 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 20 | 20 |
| 21 protected: | 21 protected: |
| 22 BeginTransformDisplayItem(DisplayItemClient, const AffineTransform&); | 22 BeginTransformDisplayItem(DisplayItemClient, const AffineTransform&); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 #ifndef NDEBUG |
| 26 virtual const char* name() const override { return "BeginTransform"; } |
| 27 #endif |
| 28 |
| 25 const AffineTransform m_transform; | 29 const AffineTransform m_transform; |
| 26 }; | 30 }; |
| 27 | 31 |
| 28 class PLATFORM_EXPORT EndTransformDisplayItem : public DisplayItem { | 32 class PLATFORM_EXPORT EndTransformDisplayItem : public DisplayItem { |
| 29 public: | 33 public: |
| 30 static PassOwnPtr<EndTransformDisplayItem> create(DisplayItemClient client)
{ return adoptPtr(new EndTransformDisplayItem(client)); } | 34 static PassOwnPtr<EndTransformDisplayItem> create(DisplayItemClient client)
{ return adoptPtr(new EndTransformDisplayItem(client)); } |
| 31 | 35 |
| 32 virtual void replay(GraphicsContext*) override; | 36 virtual void replay(GraphicsContext*) override; |
| 33 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 37 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 34 | 38 |
| 35 protected: | 39 protected: |
| 36 EndTransformDisplayItem(DisplayItemClient client) | 40 EndTransformDisplayItem(DisplayItemClient client) |
| 37 : DisplayItem(client, EndTransform) { } | 41 : DisplayItem(client, EndTransform) { } |
| 42 |
| 43 private: |
| 44 #ifndef NDEBUG |
| 45 virtual const char* name() const override { return "EndTransform"; } |
| 46 #endif |
| 38 }; | 47 }; |
| 39 | 48 |
| 40 } // namespace blink | 49 } // namespace blink |
| 41 | 50 |
| 42 #endif // TransformDisplayItem_h | 51 #endif // TransformDisplayItem_h |
| OLD | NEW |