| 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 ClipDisplayItem_h | 5 #ifndef ClipDisplayItem_h |
| 6 #define ClipDisplayItem_h | 6 #define ClipDisplayItem_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/IntRect.h" | 9 #include "platform/geometry/IntRect.h" |
| 10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 23 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 24 | 24 |
| 25 Vector<RoundedRect>& roundedRectClips() { return m_roundedRectClips; } | 25 Vector<RoundedRect>& roundedRectClips() { return m_roundedRectClips; } |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 ClipDisplayItem(DisplayItemClient client, Type type, const IntRect& clipRect
) | 28 ClipDisplayItem(DisplayItemClient client, Type type, const IntRect& clipRect
) |
| 29 : DisplayItem(client, type), m_clipRect(clipRect) { } | 29 : DisplayItem(client, type), m_clipRect(clipRect) { } |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 #ifndef NDEBUG | 32 #ifndef NDEBUG |
| 33 virtual const char* name() const override { return "Clip"; } |
| 33 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override
; | 34 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override
; |
| 34 #endif | 35 #endif |
| 35 IntRect m_clipRect; | 36 IntRect m_clipRect; |
| 36 Vector<RoundedRect> m_roundedRectClips; | 37 Vector<RoundedRect> m_roundedRectClips; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 class PLATFORM_EXPORT EndClipDisplayItem : public DisplayItem { | 40 class PLATFORM_EXPORT EndClipDisplayItem : public DisplayItem { |
| 40 public: | 41 public: |
| 41 static PassOwnPtr<EndClipDisplayItem> create(DisplayItemClient client) { ret
urn adoptPtr(new EndClipDisplayItem(client)); } | 42 static PassOwnPtr<EndClipDisplayItem> create(DisplayItemClient client) { ret
urn adoptPtr(new EndClipDisplayItem(client)); } |
| 42 | 43 |
| 43 virtual void replay(GraphicsContext*) override; | 44 virtual void replay(GraphicsContext*) override; |
| 44 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; | 45 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; |
| 45 | 46 |
| 46 protected: | 47 protected: |
| 47 EndClipDisplayItem(DisplayItemClient client) : DisplayItem(client, EndClip)
{ } | 48 EndClipDisplayItem(DisplayItemClient client) : DisplayItem(client, EndClip)
{ } |
| 49 |
| 50 private: |
| 51 #ifndef NDEBUG |
| 52 virtual const char* name() const override { return "EndClip"; } |
| 53 #endif |
| 48 }; | 54 }; |
| 49 | 55 |
| 50 } // namespace blink | 56 } // namespace blink |
| 51 | 57 |
| 52 #endif // ClipDisplayItem_h | 58 #endif // ClipDisplayItem_h |
| OLD | NEW |