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

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

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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/ui_resource_layer.cc ('k') | cc/layers/video_layer.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 #include "cc/layers/ui_resource_layer_impl.h" 5 #include "cc/layers/ui_resource_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"
(...skipping 11 matching lines...) Expand all
22 vertex_opacity_[0] = 1.0f; 22 vertex_opacity_[0] = 1.0f;
23 vertex_opacity_[1] = 1.0f; 23 vertex_opacity_[1] = 1.0f;
24 vertex_opacity_[2] = 1.0f; 24 vertex_opacity_[2] = 1.0f;
25 vertex_opacity_[3] = 1.0f; 25 vertex_opacity_[3] = 1.0f;
26 } 26 }
27 27
28 UIResourceLayerImpl::~UIResourceLayerImpl() {} 28 UIResourceLayerImpl::~UIResourceLayerImpl() {}
29 29
30 scoped_ptr<LayerImpl> UIResourceLayerImpl::CreateLayerImpl( 30 scoped_ptr<LayerImpl> UIResourceLayerImpl::CreateLayerImpl(
31 LayerTreeImpl* tree_impl) { 31 LayerTreeImpl* tree_impl) {
32 return UIResourceLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 32 return UIResourceLayerImpl::Create(tree_impl, id());
33 } 33 }
34 34
35 void UIResourceLayerImpl::PushPropertiesTo(LayerImpl* layer) { 35 void UIResourceLayerImpl::PushPropertiesTo(LayerImpl* layer) {
36 LayerImpl::PushPropertiesTo(layer); 36 LayerImpl::PushPropertiesTo(layer);
37 UIResourceLayerImpl* layer_impl = static_cast<UIResourceLayerImpl*>(layer); 37 UIResourceLayerImpl* layer_impl = static_cast<UIResourceLayerImpl*>(layer);
38 38
39 layer_impl->SetUIResourceId(ui_resource_id_); 39 layer_impl->SetUIResourceId(ui_resource_id_);
40 layer_impl->SetImageBounds(image_bounds_); 40 layer_impl->SetImageBounds(image_bounds_);
41 layer_impl->SetUV(uv_top_left_, uv_bottom_right_); 41 layer_impl->SetUV(uv_top_left_, uv_bottom_right_);
42 layer_impl->SetVertexOpacity(vertex_opacity_); 42 layer_impl->SetVertexOpacity(vertex_opacity_);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 list->AppendDouble(vertex_opacity_[3]); 159 list->AppendDouble(vertex_opacity_[3]);
160 result->Set("VertexOpacity", list); 160 result->Set("VertexOpacity", list);
161 161
162 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release()); 162 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release());
163 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release()); 163 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release());
164 164
165 return result; 165 return result;
166 } 166 }
167 167
168 } // namespace cc 168 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/layers/video_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698