| 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 PairedBeginDisplayItem
{ | 14 class PLATFORM_EXPORT BeginTransformDisplayItem : public PairedBeginDisplayItem
{ |
| 15 public: | 15 public: |
| 16 BeginTransformDisplayItem(const DisplayItemClientWrapper& client, const Affi
neTransform& transform) | 16 BeginTransformDisplayItem(const DisplayItemClientWrapper& client, const Affi
neTransform& transform) |
| 17 : PairedBeginDisplayItem(client, BeginTransform) | 17 : PairedBeginDisplayItem(client, BeginTransform) |
| 18 , m_transform(transform) { } | 18 , m_transform(transform) { } |
| 19 | 19 |
| 20 virtual void replay(GraphicsContext&) override; | 20 void replay(GraphicsContext&) override; |
| 21 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 21 void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 #ifndef NDEBUG | 24 #ifndef NDEBUG |
| 25 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override
final; | 25 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const final; |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 const AffineTransform m_transform; | 28 const AffineTransform m_transform; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 class PLATFORM_EXPORT EndTransformDisplayItem : public PairedEndDisplayItem { | 31 class PLATFORM_EXPORT EndTransformDisplayItem : public PairedEndDisplayItem { |
| 32 public: | 32 public: |
| 33 EndTransformDisplayItem(const DisplayItemClientWrapper& client) | 33 EndTransformDisplayItem(const DisplayItemClientWrapper& client) |
| 34 : PairedEndDisplayItem(client, EndTransform) { } | 34 : PairedEndDisplayItem(client, EndTransform) { } |
| 35 | 35 |
| 36 virtual void replay(GraphicsContext&) override; | 36 void replay(GraphicsContext&) override; |
| 37 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 37 void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 #if ENABLE(ASSERT) | 40 #if ENABLE(ASSERT) |
| 41 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override
final { return otherType == BeginTransform; } | 41 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot
herType == BeginTransform; } |
| 42 #endif | 42 #endif |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace blink | 45 } // namespace blink |
| 46 | 46 |
| 47 #endif // TransformDisplayItem_h | 47 #endif // TransformDisplayItem_h |
| OLD | NEW |