Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: cc/playback/compositing_display_item.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/playback/clip_path_display_item.cc ('k') | cc/playback/compositing_display_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMPOSITING_DISPLAY_ITEM_H_ 5 #ifndef CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ 6 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include <memory>
12
13 #include "base/memory/ptr_util.h"
12 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
13 #include "cc/playback/display_item.h" 15 #include "cc/playback/display_item.h"
14 #include "third_party/skia/include/core/SkColorFilter.h" 16 #include "third_party/skia/include/core/SkColorFilter.h"
15 #include "third_party/skia/include/core/SkRect.h" 17 #include "third_party/skia/include/core/SkRect.h"
16 #include "third_party/skia/include/core/SkRefCnt.h" 18 #include "third_party/skia/include/core/SkRefCnt.h"
17 #include "third_party/skia/include/core/SkXfermode.h" 19 #include "third_party/skia/include/core/SkXfermode.h"
18 #include "ui/gfx/geometry/rect_f.h" 20 #include "ui/gfx/geometry/rect_f.h"
19 21
20 class SkCanvas; 22 class SkCanvas;
21 23
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 sk_sp<SkColorFilter> color_filter_; 61 sk_sp<SkColorFilter> color_filter_;
60 bool lcd_text_requires_opaque_layer_; 62 bool lcd_text_requires_opaque_layer_;
61 }; 63 };
62 64
63 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { 65 class CC_EXPORT EndCompositingDisplayItem : public DisplayItem {
64 public: 66 public:
65 EndCompositingDisplayItem(); 67 EndCompositingDisplayItem();
66 explicit EndCompositingDisplayItem(const proto::DisplayItem& proto); 68 explicit EndCompositingDisplayItem(const proto::DisplayItem& proto);
67 ~EndCompositingDisplayItem() override; 69 ~EndCompositingDisplayItem() override;
68 70
69 static scoped_ptr<EndCompositingDisplayItem> Create() { 71 static std::unique_ptr<EndCompositingDisplayItem> Create() {
70 return make_scoped_ptr(new EndCompositingDisplayItem()); 72 return base::WrapUnique(new EndCompositingDisplayItem());
71 } 73 }
72 74
73 void ToProtobuf(proto::DisplayItem* proto, 75 void ToProtobuf(proto::DisplayItem* proto,
74 ImageSerializationProcessor* image_serialization_processor) 76 ImageSerializationProcessor* image_serialization_processor)
75 const override; 77 const override;
76 void Raster(SkCanvas* canvas, 78 void Raster(SkCanvas* canvas,
77 const gfx::Rect& canvas_target_playback_rect, 79 const gfx::Rect& canvas_target_playback_rect,
78 SkPicture::AbortCallback* callback) const override; 80 SkPicture::AbortCallback* callback) const override;
79 void AsValueInto(const gfx::Rect& visual_rect, 81 void AsValueInto(const gfx::Rect& visual_rect,
80 base::trace_event::TracedValue* array) const override; 82 base::trace_event::TracedValue* array) const override;
81 size_t ExternalMemoryUsage() const override; 83 size_t ExternalMemoryUsage() const override;
82 84
83 int ApproximateOpCount() const { return 0; } 85 int ApproximateOpCount() const { return 0; }
84 bool IsSuitableForGpuRasterization() const { return true; } 86 bool IsSuitableForGpuRasterization() const { return true; }
85 }; 87 };
86 88
87 } // namespace cc 89 } // namespace cc
88 90
89 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ 91 #endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
OLDNEW
« no previous file with comments | « cc/playback/clip_path_display_item.cc ('k') | cc/playback/compositing_display_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698