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

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

Issue 502203003: Remove implicit conversions from scoped_refptr to T* in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use .get() instead of rewriting local variable Created 6 years, 4 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_unittest.cc ('k') | cc/output/delegating_renderer.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/solid_color_layer_impl.h" 5 #include "cc/layers/solid_color_layer_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/append_quads_data.h" 9 #include "cc/layers/append_quads_data.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 layer->SetForceRenderSurface(true); 113 layer->SetForceRenderSurface(true);
114 114
115 scoped_refptr<Layer> root = Layer::Create(); 115 scoped_refptr<Layer> root = Layer::Create();
116 root->AddChild(layer); 116 root->AddChild(layer);
117 117
118 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(); 118 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
119 host->SetRootLayer(root); 119 host->SetRootLayer(root);
120 120
121 RenderSurfaceLayerList render_surface_layer_list; 121 RenderSurfaceLayerList render_surface_layer_list;
122 LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs( 122 LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs(
123 root, gfx::Size(500, 500), &render_surface_layer_list); 123 root.get(), gfx::Size(500, 500), &render_surface_layer_list);
124 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 124 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
125 125
126 EXPECT_FALSE(layer->contents_opaque()); 126 EXPECT_FALSE(layer->contents_opaque());
127 layer->SetBackgroundColor(SkColorSetARGBInline(255, 10, 20, 30)); 127 layer->SetBackgroundColor(SkColorSetARGBInline(255, 10, 20, 30));
128 EXPECT_TRUE(layer->contents_opaque()); 128 EXPECT_TRUE(layer->contents_opaque());
129 { 129 {
130 scoped_ptr<SolidColorLayerImpl> layer_impl = 130 scoped_ptr<SolidColorLayerImpl> layer_impl =
131 SolidColorLayerImpl::Create(host->host_impl()->active_tree(), 131 SolidColorLayerImpl::Create(host->host_impl()->active_tree(),
132 layer->id()); 132 layer->id());
133 layer->PushPropertiesTo(layer_impl.get()); 133 layer->PushPropertiesTo(layer_impl.get());
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 occluded, 224 occluded,
225 &partially_occluded_count); 225 &partially_occluded_count);
226 // 4 quads are completely occluded, 8 are partially occluded. 226 // 4 quads are completely occluded, 8 are partially occluded.
227 EXPECT_EQ(16u - 4u, impl.quad_list().size()); 227 EXPECT_EQ(16u - 4u, impl.quad_list().size());
228 EXPECT_EQ(8u, partially_occluded_count); 228 EXPECT_EQ(8u, partially_occluded_count);
229 } 229 }
230 } 230 }
231 231
232 } // namespace 232 } // namespace
233 } // namespace cc 233 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/output/delegating_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698