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

Side by Side Diff: cc/layers/picture_layer_impl.cc

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_impl.h ('k') | cc/layers/picture_layer_impl_perftest.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 #include "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 PictureLayerImpl::~PictureLayerImpl() { 84 PictureLayerImpl::~PictureLayerImpl() {
85 if (twin_layer_) 85 if (twin_layer_)
86 twin_layer_->twin_layer_ = nullptr; 86 twin_layer_->twin_layer_ = nullptr;
87 layer_tree_impl()->UnregisterPictureLayerImpl(this); 87 layer_tree_impl()->UnregisterPictureLayerImpl(this);
88 } 88 }
89 89
90 const char* PictureLayerImpl::LayerTypeAsString() const { 90 const char* PictureLayerImpl::LayerTypeAsString() const {
91 return "cc::PictureLayerImpl"; 91 return "cc::PictureLayerImpl";
92 } 92 }
93 93
94 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( 94 std::unique_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
95 LayerTreeImpl* tree_impl) { 95 LayerTreeImpl* tree_impl) {
96 return PictureLayerImpl::Create(tree_impl, id(), is_mask_); 96 return PictureLayerImpl::Create(tree_impl, id(), is_mask_);
97 } 97 }
98 98
99 void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) { 99 void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
100 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 100 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
101 DCHECK_EQ(layer_impl->is_mask_, is_mask_); 101 DCHECK_EQ(layer_impl->is_mask_, is_mask_);
102 102
103 LayerImpl::PushPropertiesTo(base_layer); 103 LayerImpl::PushPropertiesTo(base_layer);
104 104
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 bool PictureLayerImpl::ShouldAdjustRasterScaleDuringScaleAnimations() const { 1155 bool PictureLayerImpl::ShouldAdjustRasterScaleDuringScaleAnimations() const {
1156 return layer_tree_impl()->use_gpu_rasterization(); 1156 return layer_tree_impl()->use_gpu_rasterization();
1157 } 1157 }
1158 1158
1159 float PictureLayerImpl::MaximumTilingContentsScale() const { 1159 float PictureLayerImpl::MaximumTilingContentsScale() const {
1160 float max_contents_scale = tilings_->GetMaximumContentsScale(); 1160 float max_contents_scale = tilings_->GetMaximumContentsScale();
1161 return std::max(max_contents_scale, MinimumContentsScale()); 1161 return std::max(max_contents_scale, MinimumContentsScale());
1162 } 1162 }
1163 1163
1164 scoped_ptr<PictureLayerTilingSet> 1164 std::unique_ptr<PictureLayerTilingSet>
1165 PictureLayerImpl::CreatePictureLayerTilingSet() { 1165 PictureLayerImpl::CreatePictureLayerTilingSet() {
1166 const LayerTreeSettings& settings = layer_tree_impl()->settings(); 1166 const LayerTreeSettings& settings = layer_tree_impl()->settings();
1167 return PictureLayerTilingSet::Create( 1167 return PictureLayerTilingSet::Create(
1168 GetTree(), this, settings.tiling_interest_area_padding, 1168 GetTree(), this, settings.tiling_interest_area_padding,
1169 layer_tree_impl()->use_gpu_rasterization() 1169 layer_tree_impl()->use_gpu_rasterization()
1170 ? settings.gpu_rasterization_skewport_target_time_in_seconds 1170 ? settings.gpu_rasterization_skewport_target_time_in_seconds
1171 : settings.skewport_target_time_in_seconds, 1171 : settings.skewport_target_time_in_seconds,
1172 settings.skewport_extrapolation_limit_in_content_pixels); 1172 settings.skewport_extrapolation_limit_in_content_pixels);
1173 } 1173 }
1174 1174
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 1255
1256 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1256 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1257 return !layer_tree_impl()->IsRecycleTree(); 1257 return !layer_tree_impl()->IsRecycleTree();
1258 } 1258 }
1259 1259
1260 bool PictureLayerImpl::HasValidTilePriorities() const { 1260 bool PictureLayerImpl::HasValidTilePriorities() const {
1261 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1261 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1262 } 1262 }
1263 1263
1264 } // namespace cc 1264 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698