| 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_CLIP_PATH_DISPLAY_ITEM_H_ | 5 #ifndef CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ |
| 6 #define CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ | 6 #define CC_PLAYBACK_CLIP_PATH_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 "third_party/skia/include/core/SkPath.h" | 15 #include "third_party/skia/include/core/SkPath.h" |
| 14 #include "third_party/skia/include/core/SkRegion.h" | 16 #include "third_party/skia/include/core/SkRegion.h" |
| 15 | 17 |
| 16 class SkCanvas; | 18 class SkCanvas; |
| 17 | 19 |
| 18 namespace cc { | 20 namespace cc { |
| 19 class ImageSerializationProcessor; | 21 class ImageSerializationProcessor; |
| 20 | 22 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 SkRegion::Op clip_op_; | 46 SkRegion::Op clip_op_; |
| 45 bool antialias_; | 47 bool antialias_; |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 class CC_EXPORT EndClipPathDisplayItem : public DisplayItem { | 50 class CC_EXPORT EndClipPathDisplayItem : public DisplayItem { |
| 49 public: | 51 public: |
| 50 EndClipPathDisplayItem(); | 52 EndClipPathDisplayItem(); |
| 51 explicit EndClipPathDisplayItem(const proto::DisplayItem& proto); | 53 explicit EndClipPathDisplayItem(const proto::DisplayItem& proto); |
| 52 ~EndClipPathDisplayItem() override; | 54 ~EndClipPathDisplayItem() override; |
| 53 | 55 |
| 54 static scoped_ptr<EndClipPathDisplayItem> Create() { | 56 static std::unique_ptr<EndClipPathDisplayItem> Create() { |
| 55 return make_scoped_ptr(new EndClipPathDisplayItem()); | 57 return base::WrapUnique(new EndClipPathDisplayItem()); |
| 56 } | 58 } |
| 57 | 59 |
| 58 void ToProtobuf(proto::DisplayItem* proto, | 60 void ToProtobuf(proto::DisplayItem* proto, |
| 59 ImageSerializationProcessor* image_serialization_processor) | 61 ImageSerializationProcessor* image_serialization_processor) |
| 60 const override; | 62 const override; |
| 61 void Raster(SkCanvas* canvas, | 63 void Raster(SkCanvas* canvas, |
| 62 const gfx::Rect& canvas_target_playback_rect, | 64 const gfx::Rect& canvas_target_playback_rect, |
| 63 SkPicture::AbortCallback* callback) const override; | 65 SkPicture::AbortCallback* callback) const override; |
| 64 void AsValueInto(const gfx::Rect& visual_rect, | 66 void AsValueInto(const gfx::Rect& visual_rect, |
| 65 base::trace_event::TracedValue* array) const override; | 67 base::trace_event::TracedValue* array) const override; |
| 66 size_t ExternalMemoryUsage() const override; | 68 size_t ExternalMemoryUsage() const override; |
| 67 | 69 |
| 68 int ApproximateOpCount() const { return 0; } | 70 int ApproximateOpCount() const { return 0; } |
| 69 bool IsSuitableForGpuRasterization() const { return true; } | 71 bool IsSuitableForGpuRasterization() const { return true; } |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 } // namespace cc | 74 } // namespace cc |
| 73 | 75 |
| 74 #endif // CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ | 76 #endif // CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ |
| OLD | NEW |