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

Side by Side Diff: cc/layers/solid_color_layer_impl.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/layers/solid_color_layer.cc ('k') | cc/layers/solid_color_layer_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_LAYERS_SOLID_COLOR_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
6 #define CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_ 6 #define CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/ptr_util.h"
10 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
11 #include "cc/layers/layer_impl.h" 13 #include "cc/layers/layer_impl.h"
12 14
13 namespace cc { 15 namespace cc {
14 16
15 class CC_EXPORT SolidColorLayerImpl : public LayerImpl { 17 class CC_EXPORT SolidColorLayerImpl : public LayerImpl {
16 public: 18 public:
17 static scoped_ptr<SolidColorLayerImpl> Create(LayerTreeImpl* tree_impl, 19 static std::unique_ptr<SolidColorLayerImpl> Create(LayerTreeImpl* tree_impl,
18 int id) { 20 int id) {
19 return make_scoped_ptr(new SolidColorLayerImpl(tree_impl, id)); 21 return base::WrapUnique(new SolidColorLayerImpl(tree_impl, id));
20 } 22 }
21 23
22 static void AppendSolidQuads(RenderPass* render_pass, 24 static void AppendSolidQuads(RenderPass* render_pass,
23 const Occlusion& occlusion_in_layer_space, 25 const Occlusion& occlusion_in_layer_space,
24 SharedQuadState* shared_quad_state, 26 SharedQuadState* shared_quad_state,
25 const gfx::Rect& visible_layer_rect, 27 const gfx::Rect& visible_layer_rect,
26 SkColor color, 28 SkColor color,
27 AppendQuadsData* append_quads_data); 29 AppendQuadsData* append_quads_data);
28 30
29 ~SolidColorLayerImpl() override; 31 ~SolidColorLayerImpl() override;
30 32
31 // LayerImpl overrides. 33 // LayerImpl overrides.
32 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 34 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
33 void AppendQuads(RenderPass* render_pass, 35 void AppendQuads(RenderPass* render_pass,
34 AppendQuadsData* append_quads_data) override; 36 AppendQuadsData* append_quads_data) override;
35 37
36 protected: 38 protected:
37 SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id); 39 SolidColorLayerImpl(LayerTreeImpl* tree_impl, int id);
38 40
39 private: 41 private:
40 const char* LayerTypeAsString() const override; 42 const char* LayerTypeAsString() const override;
41 43
42 DISALLOW_COPY_AND_ASSIGN(SolidColorLayerImpl); 44 DISALLOW_COPY_AND_ASSIGN(SolidColorLayerImpl);
43 }; 45 };
44 46
45 } // namespace cc 47 } // namespace cc
46 48
47 #endif // CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_ 49 #endif // CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer.cc ('k') | cc/layers/solid_color_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698