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

Side by Side Diff: cc/layers/picture_image_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/picture_image_layer.cc ('k') | cc/layers/picture_image_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PICTURE_IMAGE_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
6 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ 6 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h"
9 #include "cc/layers/picture_layer_impl.h" 10 #include "cc/layers/picture_layer_impl.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
13 class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl { 14 class CC_EXPORT PictureImageLayerImpl : public PictureLayerImpl {
14 public: 15 public:
15 static scoped_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl, 16 static std::unique_ptr<PictureImageLayerImpl> Create(LayerTreeImpl* tree_impl,
16 int id, 17 int id,
17 bool is_mask) { 18 bool is_mask) {
18 return make_scoped_ptr(new PictureImageLayerImpl(tree_impl, id, is_mask)); 19 return base::WrapUnique(new PictureImageLayerImpl(tree_impl, id, is_mask));
19 } 20 }
20 ~PictureImageLayerImpl() override; 21 ~PictureImageLayerImpl() override;
21 22
22 // LayerImpl overrides. 23 // LayerImpl overrides.
23 const char* LayerTypeAsString() const override; 24 const char* LayerTypeAsString() const override;
24 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 25 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
25 26
26 protected: 27 protected:
27 PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask); 28 PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id, bool is_mask);
28 29
29 bool ShouldAdjustRasterScale() const override; 30 bool ShouldAdjustRasterScale() const override;
30 void RecalculateRasterScales() override; 31 void RecalculateRasterScales() override;
31 void GetDebugBorderProperties(SkColor* color, float* width) const override; 32 void GetDebugBorderProperties(SkColor* color, float* width) const override;
32 33
33 void UpdateIdealScales() override; 34 void UpdateIdealScales() override;
34 35
35 private: 36 private:
36 DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl); 37 DISALLOW_COPY_AND_ASSIGN(PictureImageLayerImpl);
37 }; 38 };
38 39
39 } // namespace cc 40 } // namespace cc
40 41
41 #endif // CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_ 42 #endif // CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/layers/picture_image_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698