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 CC_PAINT_CLIP_PATH_DISPLAY_ITEM_H_ | 5 #ifndef CC_PAINT_CLIP_PATH_DISPLAY_ITEM_H_ |
6 #define CC_PAINT_CLIP_PATH_DISPLAY_ITEM_H_ | 6 #define CC_PAINT_CLIP_PATH_DISPLAY_ITEM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "cc/paint/display_item.h" | 10 #include "cc/paint/display_item.h" |
11 #include "cc/paint/paint_export.h" | 11 #include "cc/paint/paint_export.h" |
12 #include "third_party/skia/include/core/SkPath.h" | 12 #include "third_party/skia/include/core/SkPath.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class CC_PAINT_EXPORT ClipPathDisplayItem : public DisplayItem { | 16 class CC_PAINT_EXPORT ClipPathDisplayItem : public DisplayItem { |
17 public: | 17 public: |
18 ClipPathDisplayItem(const SkPath& path, bool antialias); | 18 ClipPathDisplayItem(const SkPath& path, bool antialias); |
19 ~ClipPathDisplayItem() override; | 19 ~ClipPathDisplayItem() override; |
20 | 20 |
21 size_t ExternalMemoryUsage() const { | 21 size_t ExternalMemoryUsage() const { |
22 // The size of SkPath's external storage is not currently accounted for (and | 22 // The size of SkPath's external storage is not currently accounted for (and |
23 // may well be shared anyway). | 23 // may well be shared anyway). |
24 return 0; | 24 return 0; |
25 } | 25 } |
26 int ApproximateOpCount() const { return 1; } | 26 int OpCount() const { return 1; } |
27 | 27 |
28 const SkPath clip_path; | 28 const SkPath clip_path; |
29 const bool antialias; | 29 const bool antialias; |
30 }; | 30 }; |
31 | 31 |
32 class CC_PAINT_EXPORT EndClipPathDisplayItem : public DisplayItem { | 32 class CC_PAINT_EXPORT EndClipPathDisplayItem : public DisplayItem { |
33 public: | 33 public: |
34 EndClipPathDisplayItem(); | 34 EndClipPathDisplayItem(); |
35 ~EndClipPathDisplayItem() override; | 35 ~EndClipPathDisplayItem() override; |
36 | 36 |
37 int ApproximateOpCount() const { return 0; } | 37 int OpCount() const { return 0; } |
38 }; | 38 }; |
39 | 39 |
40 } // namespace cc | 40 } // namespace cc |
41 | 41 |
42 #endif // CC_PAINT_CLIP_PATH_DISPLAY_ITEM_H_ | 42 #endif // CC_PAINT_CLIP_PATH_DISPLAY_ITEM_H_ |
OLD | NEW |