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 CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ | 5 #ifndef CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ |
6 #define CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ | 6 #define CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 gfx::Rect clip_rect, | 26 gfx::Rect clip_rect, |
27 const std::vector<SkRRect>& rounded_clip_rects) { | 27 const std::vector<SkRRect>& rounded_clip_rects) { |
28 return make_scoped_ptr(new ClipDisplayItem(clip_rect, rounded_clip_rects)); | 28 return make_scoped_ptr(new ClipDisplayItem(clip_rect, rounded_clip_rects)); |
29 } | 29 } |
30 | 30 |
31 void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override; | 31 void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override; |
32 | 32 |
33 bool IsSuitableForGpuRasterization() const override; | 33 bool IsSuitableForGpuRasterization() const override; |
34 int ApproximateOpCount() const override; | 34 int ApproximateOpCount() const override; |
35 size_t PictureMemoryUsage() const override; | 35 size_t PictureMemoryUsage() const override; |
36 void AsValueInto(base::debug::TracedValue* array) const override; | 36 void AsValueInto(base::trace_event::TracedValue* array) const override; |
37 | 37 |
38 protected: | 38 protected: |
39 ClipDisplayItem(gfx::Rect clip_rect, | 39 ClipDisplayItem(gfx::Rect clip_rect, |
40 const std::vector<SkRRect>& rounded_clip_rects); | 40 const std::vector<SkRRect>& rounded_clip_rects); |
41 | 41 |
42 private: | 42 private: |
43 gfx::Rect clip_rect_; | 43 gfx::Rect clip_rect_; |
44 std::vector<SkRRect> rounded_clip_rects_; | 44 std::vector<SkRRect> rounded_clip_rects_; |
45 }; | 45 }; |
46 | 46 |
47 class CC_EXPORT EndClipDisplayItem : public DisplayItem { | 47 class CC_EXPORT EndClipDisplayItem : public DisplayItem { |
48 public: | 48 public: |
49 ~EndClipDisplayItem() override; | 49 ~EndClipDisplayItem() override; |
50 | 50 |
51 static scoped_ptr<EndClipDisplayItem> Create() { | 51 static scoped_ptr<EndClipDisplayItem> Create() { |
52 return make_scoped_ptr(new EndClipDisplayItem()); | 52 return make_scoped_ptr(new EndClipDisplayItem()); |
53 } | 53 } |
54 | 54 |
55 void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override; | 55 void Raster(SkCanvas* canvas, SkDrawPictureCallback* callback) const override; |
56 | 56 |
57 bool IsSuitableForGpuRasterization() const override; | 57 bool IsSuitableForGpuRasterization() const override; |
58 int ApproximateOpCount() const override; | 58 int ApproximateOpCount() const override; |
59 size_t PictureMemoryUsage() const override; | 59 size_t PictureMemoryUsage() const override; |
60 void AsValueInto(base::debug::TracedValue* array) const override; | 60 void AsValueInto(base::trace_event::TracedValue* array) const override; |
61 | 61 |
62 protected: | 62 protected: |
63 EndClipDisplayItem(); | 63 EndClipDisplayItem(); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace cc | 66 } // namespace cc |
67 | 67 |
68 #endif // CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ | 68 #endif // CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ |
OLD | NEW |