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