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_PLAYBACK_FILTER_DISPLAY_ITEM_H_ | 5 #ifndef CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ |
6 #define CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ | 6 #define CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 12 matching lines...) Expand all Loading... |
23 class CC_EXPORT FilterDisplayItem : public DisplayItem { | 23 class CC_EXPORT FilterDisplayItem : public DisplayItem { |
24 public: | 24 public: |
25 FilterDisplayItem(const FilterOperations& filters, const gfx::RectF& bounds); | 25 FilterDisplayItem(const FilterOperations& filters, const gfx::RectF& bounds); |
26 explicit FilterDisplayItem(const proto::DisplayItem& proto); | 26 explicit FilterDisplayItem(const proto::DisplayItem& proto); |
27 ~FilterDisplayItem() override; | 27 ~FilterDisplayItem() override; |
28 | 28 |
29 void ToProtobuf(proto::DisplayItem* proto, | 29 void ToProtobuf(proto::DisplayItem* proto, |
30 ImageSerializationProcessor* image_serialization_processor) | 30 ImageSerializationProcessor* image_serialization_processor) |
31 const override; | 31 const override; |
32 void Raster(SkCanvas* canvas, | 32 void Raster(SkCanvas* canvas, |
33 const gfx::Rect& canvas_target_playback_rect, | |
34 SkPicture::AbortCallback* callback) const override; | 33 SkPicture::AbortCallback* callback) const override; |
35 void AsValueInto(const gfx::Rect& visual_rect, | 34 void AsValueInto(const gfx::Rect& visual_rect, |
36 base::trace_event::TracedValue* array) const override; | 35 base::trace_event::TracedValue* array) const override; |
37 size_t ExternalMemoryUsage() const override; | 36 size_t ExternalMemoryUsage() const override; |
38 | 37 |
39 int ApproximateOpCount() const { return 1; } | 38 int ApproximateOpCount() const { return 1; } |
40 | 39 |
41 private: | 40 private: |
42 void SetNew(const FilterOperations& filters, const gfx::RectF& bounds); | 41 void SetNew(const FilterOperations& filters, const gfx::RectF& bounds); |
43 | 42 |
44 FilterOperations filters_; | 43 FilterOperations filters_; |
45 gfx::RectF bounds_; | 44 gfx::RectF bounds_; |
46 }; | 45 }; |
47 | 46 |
48 class CC_EXPORT EndFilterDisplayItem : public DisplayItem { | 47 class CC_EXPORT EndFilterDisplayItem : public DisplayItem { |
49 public: | 48 public: |
50 EndFilterDisplayItem(); | 49 EndFilterDisplayItem(); |
51 explicit EndFilterDisplayItem(const proto::DisplayItem& proto); | 50 explicit EndFilterDisplayItem(const proto::DisplayItem& proto); |
52 ~EndFilterDisplayItem() override; | 51 ~EndFilterDisplayItem() override; |
53 | 52 |
54 static std::unique_ptr<EndFilterDisplayItem> Create() { | 53 static std::unique_ptr<EndFilterDisplayItem> Create() { |
55 return base::WrapUnique(new EndFilterDisplayItem()); | 54 return base::WrapUnique(new EndFilterDisplayItem()); |
56 } | 55 } |
57 | 56 |
58 void ToProtobuf(proto::DisplayItem* proto, | 57 void ToProtobuf(proto::DisplayItem* proto, |
59 ImageSerializationProcessor* image_serialization_processor) | 58 ImageSerializationProcessor* image_serialization_processor) |
60 const override; | 59 const override; |
61 void Raster(SkCanvas* canvas, | 60 void Raster(SkCanvas* canvas, |
62 const gfx::Rect& canvas_target_playback_rect, | |
63 SkPicture::AbortCallback* callback) const override; | 61 SkPicture::AbortCallback* callback) const override; |
64 void AsValueInto(const gfx::Rect& visual_rect, | 62 void AsValueInto(const gfx::Rect& visual_rect, |
65 base::trace_event::TracedValue* array) const override; | 63 base::trace_event::TracedValue* array) const override; |
66 size_t ExternalMemoryUsage() const override; | 64 size_t ExternalMemoryUsage() const override; |
67 | 65 |
68 int ApproximateOpCount() const { return 0; } | 66 int ApproximateOpCount() const { return 0; } |
69 }; | 67 }; |
70 | 68 |
71 } // namespace cc | 69 } // namespace cc |
72 | 70 |
73 #endif // CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ | 71 #endif // CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ |
OLD | NEW |