| 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 <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/ptr_util.h" |
| 13 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
| 14 #include "cc/playback/display_item.h" | 15 #include "cc/playback/display_item.h" |
| 15 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
| 16 | 17 |
| 17 class SkCanvas; | 18 class SkCanvas; |
| 18 | 19 |
| 19 namespace cc { | 20 namespace cc { |
| 20 class ImageSerializationProcessor; | 21 class ImageSerializationProcessor; |
| 21 | 22 |
| 22 class CC_EXPORT FloatClipDisplayItem : public DisplayItem { | 23 class CC_EXPORT FloatClipDisplayItem : public DisplayItem { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 | 44 |
| 44 gfx::RectF clip_rect_; | 45 gfx::RectF clip_rect_; |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { | 48 class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { |
| 48 public: | 49 public: |
| 49 EndFloatClipDisplayItem(); | 50 EndFloatClipDisplayItem(); |
| 50 explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto); | 51 explicit EndFloatClipDisplayItem(const proto::DisplayItem& proto); |
| 51 ~EndFloatClipDisplayItem() override; | 52 ~EndFloatClipDisplayItem() override; |
| 52 | 53 |
| 53 static scoped_ptr<EndFloatClipDisplayItem> Create() { | 54 static std::unique_ptr<EndFloatClipDisplayItem> Create() { |
| 54 return make_scoped_ptr(new EndFloatClipDisplayItem()); | 55 return base::WrapUnique(new EndFloatClipDisplayItem()); |
| 55 } | 56 } |
| 56 | 57 |
| 57 void ToProtobuf(proto::DisplayItem* proto, | 58 void ToProtobuf(proto::DisplayItem* proto, |
| 58 ImageSerializationProcessor* image_serialization_processor) | 59 ImageSerializationProcessor* image_serialization_processor) |
| 59 const override; | 60 const override; |
| 60 void Raster(SkCanvas* canvas, | 61 void Raster(SkCanvas* canvas, |
| 61 const gfx::Rect& canvas_target_playback_rect, | 62 const gfx::Rect& canvas_target_playback_rect, |
| 62 SkPicture::AbortCallback* callback) const override; | 63 SkPicture::AbortCallback* callback) const override; |
| 63 void AsValueInto(const gfx::Rect& visual_rect, | 64 void AsValueInto(const gfx::Rect& visual_rect, |
| 64 base::trace_event::TracedValue* array) const override; | 65 base::trace_event::TracedValue* array) const override; |
| 65 size_t ExternalMemoryUsage() const override; | 66 size_t ExternalMemoryUsage() const override; |
| 66 | 67 |
| 67 int ApproximateOpCount() const { return 0; } | 68 int ApproximateOpCount() const { return 0; } |
| 68 bool IsSuitableForGpuRasterization() const { return true; } | 69 bool IsSuitableForGpuRasterization() const { return true; } |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace cc | 72 } // namespace cc |
| 72 | 73 |
| 73 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ | 74 #endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ |
| OLD | NEW |