OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ClipPathDisplayItem_h | 5 #ifndef ClipPathDisplayItem_h |
6 #define ClipPathDisplayItem_h | 6 #define ClipPathDisplayItem_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/graphics/Path.h" | 9 #include "platform/graphics/Path.h" |
10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
11 #include "third_party/skia/include/core/SkPath.h" | 11 #include "third_party/skia/include/core/SkPath.h" |
12 #include "wtf/PassOwnPtr.h" | |
13 | 12 |
14 namespace blink { | 13 namespace blink { |
15 | 14 |
16 class PLATFORM_EXPORT BeginClipPathDisplayItem final : public PairedBeginDisplay
Item { | 15 class PLATFORM_EXPORT BeginClipPathDisplayItem final : public PairedBeginDisplay
Item { |
17 public: | 16 public: |
18 BeginClipPathDisplayItem(const DisplayItemClient& client, const Path& clipPa
th) | 17 BeginClipPathDisplayItem(const DisplayItemClient& client, const Path& clipPa
th) |
19 : PairedBeginDisplayItem(client, BeginClipPath, sizeof(*this)) | 18 : PairedBeginDisplayItem(client, BeginClipPath, sizeof(*this)) |
20 , m_clipPath(clipPath.getSkPath()) { } | 19 , m_clipPath(clipPath.getSkPath()) { } |
21 | 20 |
22 void replay(GraphicsContext&) const override; | 21 void replay(GraphicsContext&) const override; |
(...skipping 25 matching lines...) Expand all Loading... |
48 | 47 |
49 private: | 48 private: |
50 #if ENABLE(ASSERT) | 49 #if ENABLE(ASSERT) |
51 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot
herType == BeginClipPath; } | 50 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot
herType == BeginClipPath; } |
52 #endif | 51 #endif |
53 }; | 52 }; |
54 | 53 |
55 } // namespace blink | 54 } // namespace blink |
56 | 55 |
57 #endif // ClipPathDisplayItem_h | 56 #endif // ClipPathDisplayItem_h |
OLD | NEW |