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

Side by Side Diff: cc/layers/nine_patch_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/nine_patch_layer_impl.h ('k') | cc/layers/nine_patch_layer_impl_unittest.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/nine_patch_layer_impl.h" 5 #include "cc/layers/nine_patch_layer_impl.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/quads/texture_draw_quad.h" 10 #include "cc/quads/texture_draw_quad.h"
11 #include "cc/trees/layer_tree_impl.h" 11 #include "cc/trees/layer_tree_impl.h"
12 #include "cc/trees/occlusion.h" 12 #include "cc/trees/occlusion.h"
13 #include "ui/gfx/geometry/rect_f.h" 13 #include "ui/gfx/geometry/rect_f.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 NinePatchLayerImpl::NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id) 17 NinePatchLayerImpl::NinePatchLayerImpl(LayerTreeImpl* tree_impl, int id)
18 : UIResourceLayerImpl(tree_impl, id), 18 : UIResourceLayerImpl(tree_impl, id),
19 fill_center_(false), 19 fill_center_(false),
20 nearest_neighbor_(false) {} 20 nearest_neighbor_(false) {}
21 21
22 NinePatchLayerImpl::~NinePatchLayerImpl() {} 22 NinePatchLayerImpl::~NinePatchLayerImpl() {}
23 23
24 scoped_ptr<LayerImpl> NinePatchLayerImpl::CreateLayerImpl( 24 std::unique_ptr<LayerImpl> NinePatchLayerImpl::CreateLayerImpl(
25 LayerTreeImpl* tree_impl) { 25 LayerTreeImpl* tree_impl) {
26 return NinePatchLayerImpl::Create(tree_impl, id()); 26 return NinePatchLayerImpl::Create(tree_impl, id());
27 } 27 }
28 28
29 void NinePatchLayerImpl::PushPropertiesTo(LayerImpl* layer) { 29 void NinePatchLayerImpl::PushPropertiesTo(LayerImpl* layer) {
30 UIResourceLayerImpl::PushPropertiesTo(layer); 30 UIResourceLayerImpl::PushPropertiesTo(layer);
31 NinePatchLayerImpl* layer_impl = static_cast<NinePatchLayerImpl*>(layer); 31 NinePatchLayerImpl* layer_impl = static_cast<NinePatchLayerImpl*>(layer);
32 32
33 layer_impl->SetLayout(image_aperture_, border_, fill_center_, 33 layer_impl->SetLayout(image_aperture_, border_, fill_center_,
34 nearest_neighbor_); 34 nearest_neighbor_);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 result->Set("ImageBounds", list); 366 result->Set("ImageBounds", list);
367 367
368 result->Set("Border", MathUtil::AsValue(border_).release()); 368 result->Set("Border", MathUtil::AsValue(border_).release());
369 369
370 result->SetBoolean("FillCenter", fill_center_); 370 result->SetBoolean("FillCenter", fill_center_);
371 371
372 return result; 372 return result;
373 } 373 }
374 374
375 } // namespace cc 375 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/nine_patch_layer_impl.h ('k') | cc/layers/nine_patch_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698