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

Side by Side Diff: cc/layers/picture_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_layer.cc ('k') | cc/layers/picture_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_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h"
15 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.h"
16 #include "cc/layers/layer_impl.h" 17 #include "cc/layers/layer_impl.h"
17 #include "cc/tiles/picture_layer_tiling.h" 18 #include "cc/tiles/picture_layer_tiling.h"
18 #include "cc/tiles/picture_layer_tiling_set.h" 19 #include "cc/tiles/picture_layer_tiling_set.h"
19 #include "cc/tiles/tiling_set_eviction_queue.h" 20 #include "cc/tiles/tiling_set_eviction_queue.h"
20 21
21 namespace cc { 22 namespace cc {
22 23
23 struct AppendQuadsData; 24 struct AppendQuadsData;
24 class MicroBenchmarkImpl; 25 class MicroBenchmarkImpl;
25 class Tile; 26 class Tile;
26 27
27 class CC_EXPORT PictureLayerImpl 28 class CC_EXPORT PictureLayerImpl
28 : public LayerImpl, 29 : public LayerImpl,
29 NON_EXPORTED_BASE(public PictureLayerTilingClient) { 30 NON_EXPORTED_BASE(public PictureLayerTilingClient) {
30 public: 31 public:
31 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, 32 static std::unique_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl,
32 int id, 33 int id,
33 bool is_mask) { 34 bool is_mask) {
34 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id, is_mask)); 35 return base::WrapUnique(new PictureLayerImpl(tree_impl, id, is_mask));
35 } 36 }
36 ~PictureLayerImpl() override; 37 ~PictureLayerImpl() override;
37 38
38 bool is_mask() const { return is_mask_; } 39 bool is_mask() const { return is_mask_; }
39 40
40 // LayerImpl overrides. 41 // LayerImpl overrides.
41 const char* LayerTypeAsString() const override; 42 const char* LayerTypeAsString() const override;
42 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 43 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
43 void PushPropertiesTo(LayerImpl* layer) override; 44 void PushPropertiesTo(LayerImpl* layer) override;
44 void AppendQuads(RenderPass* render_pass, 45 void AppendQuads(RenderPass* render_pass,
45 AppendQuadsData* append_quads_data) override; 46 AppendQuadsData* append_quads_data) override;
46 void NotifyTileStateChanged(const Tile* tile) override; 47 void NotifyTileStateChanged(const Tile* tile) override;
47 void DidBeginTracing() override; 48 void DidBeginTracing() override;
48 void ReleaseResources() override; 49 void ReleaseResources() override;
49 void RecreateResources() override; 50 void RecreateResources() override;
50 Region GetInvalidationRegionForDebugging() override; 51 Region GetInvalidationRegionForDebugging() override;
51 52
52 // PictureLayerTilingClient overrides. 53 // PictureLayerTilingClient overrides.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void SanityCheckTilingState() const; 114 void SanityCheckTilingState() const;
114 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; 115 bool ShouldAdjustRasterScaleDuringScaleAnimations() const;
115 116
116 void GetDebugBorderProperties(SkColor* color, float* width) const override; 117 void GetDebugBorderProperties(SkColor* color, float* width) const override;
117 void GetAllPrioritizedTilesForTracing( 118 void GetAllPrioritizedTilesForTracing(
118 std::vector<PrioritizedTile>* prioritized_tiles) const override; 119 std::vector<PrioritizedTile>* prioritized_tiles) const override;
119 void AsValueInto(base::trace_event::TracedValue* dict) const override; 120 void AsValueInto(base::trace_event::TracedValue* dict) const override;
120 121
121 virtual void UpdateIdealScales(); 122 virtual void UpdateIdealScales();
122 float MaximumTilingContentsScale() const; 123 float MaximumTilingContentsScale() const;
123 scoped_ptr<PictureLayerTilingSet> CreatePictureLayerTilingSet(); 124 std::unique_ptr<PictureLayerTilingSet> CreatePictureLayerTilingSet();
124 125
125 PictureLayerImpl* twin_layer_; 126 PictureLayerImpl* twin_layer_;
126 127
127 scoped_ptr<PictureLayerTilingSet> tilings_; 128 std::unique_ptr<PictureLayerTilingSet> tilings_;
128 scoped_refptr<RasterSource> raster_source_; 129 scoped_refptr<RasterSource> raster_source_;
129 Region invalidation_; 130 Region invalidation_;
130 131
131 float ideal_page_scale_; 132 float ideal_page_scale_;
132 float ideal_device_scale_; 133 float ideal_device_scale_;
133 float ideal_source_scale_; 134 float ideal_source_scale_;
134 float ideal_contents_scale_; 135 float ideal_contents_scale_;
135 136
136 float raster_page_scale_; 137 float raster_page_scale_;
137 float raster_device_scale_; 138 float raster_device_scale_;
(...skipping 19 matching lines...) Expand all
157 // of comparing pointers, since objects pointed to are not guaranteed to 158 // of comparing pointers, since objects pointed to are not guaranteed to
158 // exist. 159 // exist.
159 std::vector<PictureLayerTiling*> last_append_quads_tilings_; 160 std::vector<PictureLayerTiling*> last_append_quads_tilings_;
160 161
161 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 162 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
162 }; 163 };
163 164
164 } // namespace cc 165 } // namespace cc
165 166
166 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 167 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698