| 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_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ | 5 #ifndef CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ |
| 6 #define CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ | 6 #define CC_PLAYBACK_FLOAT_CLIP_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 FloatClipDisplayItem : public DisplayItem { | 23 class CC_EXPORT FloatClipDisplayItem : public DisplayItem { |
| 24 public: | 24 public: |
| 25 explicit FloatClipDisplayItem(const gfx::RectF& clip_rect); | 25 explicit FloatClipDisplayItem(const gfx::RectF& clip_rect); |
| 26 explicit FloatClipDisplayItem(const proto::DisplayItem& proto); | 26 explicit FloatClipDisplayItem(const proto::DisplayItem& proto); |
| 27 ~FloatClipDisplayItem() override; | 27 ~FloatClipDisplayItem() 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 gfx::RectF& clip_rect); | 41 void SetNew(const gfx::RectF& clip_rect); |
| 43 | 42 |
| 44 gfx::RectF clip_rect_; | 43 gfx::RectF clip_rect_; |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { | 46 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { |
| 48 public: | 47 public: |
| 49 EndFloatClipDisplayItem(); | 48 EndFloatClipDisplayItem(); |
| 50 explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto); | 49 explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto); |
| 51 ~EndFloatClipDisplayItem() override; | 50 ~EndFloatClipDisplayItem() override; |
| 52 | 51 |
| 53 static std::unique_ptr<EndFloatClipDisplayItem> Create() { | 52 static std::unique_ptr<EndFloatClipDisplayItem> Create() { |
| 54 return base::WrapUnique(new EndFloatClipDisplayItem()); | 53 return base::WrapUnique(new EndFloatClipDisplayItem()); |
| 55 } | 54 } |
| 56 | 55 |
| 57 void ToProtobuf(proto::DisplayItem* proto, | 56 void ToProtobuf(proto::DisplayItem* proto, |
| 58 ImageSerializationProcessor* image_serialization_processor) | 57 ImageSerializationProcessor* image_serialization_processor) |
| 59 const override; | 58 const override; |
| 60 void Raster(SkCanvas* canvas, | 59 void Raster(SkCanvas* canvas, |
| 61 const gfx::Rect& canvas_target_playback_rect, | |
| 62 SkPicture::AbortCallback* callback) const override; | 60 SkPicture::AbortCallback* callback) const override; |
| 63 void AsValueInto(const gfx::Rect& visual_rect, | 61 void AsValueInto(const gfx::Rect& visual_rect, |
| 64 base::trace_event::TracedValue* array) const override; | 62 base::trace_event::TracedValue* array) const override; |
| 65 size_t ExternalMemoryUsage() const override; | 63 size_t ExternalMemoryUsage() const override; |
| 66 | 64 |
| 67 int ApproximateOpCount() const { return 0; } | 65 int ApproximateOpCount() const { return 0; } |
| 68 }; | 66 }; |
| 69 | 67 |
| 70 } // namespace cc | 68 } // namespace cc |
| 71 | 69 |
| 72 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ | 70 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ |
| OLD | NEW |