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

Side by Side Diff: cc/test/tiled_layer_test_common.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/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host.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/test/tiled_layer_test_common.h" 5 #include "cc/test/tiled_layer_test_common.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, 9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer,
10 scoped_ptr<PrioritizedResource> texture) 10 scoped_ptr<PrioritizedResource> texture)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 void FakeLayerUpdater::SetRectToInvalidate(const gfx::Rect& rect, 53 void FakeLayerUpdater::SetRectToInvalidate(const gfx::Rect& rect,
54 FakeTiledLayer* layer) { 54 FakeTiledLayer* layer) {
55 rect_to_invalidate_ = rect; 55 rect_to_invalidate_ = rect;
56 layer_ = layer; 56 layer_ = layer;
57 } 57 }
58 58
59 scoped_ptr<LayerUpdater::Resource> FakeLayerUpdater::CreateResource( 59 scoped_ptr<LayerUpdater::Resource> FakeLayerUpdater::CreateResource(
60 PrioritizedResourceManager* manager) { 60 PrioritizedResourceManager* manager) {
61 return scoped_ptr<LayerUpdater::Resource>( 61 return make_scoped_ptr(
62 new Resource(this, PrioritizedResource::Create(manager))); 62 new Resource(this, PrioritizedResource::Create(manager)));
63 } 63 }
64 64
65 FakeTiledLayerImpl::FakeTiledLayerImpl(LayerTreeImpl* tree_impl, int id) 65 FakeTiledLayerImpl::FakeTiledLayerImpl(LayerTreeImpl* tree_impl, int id)
66 : TiledLayerImpl(tree_impl, id) {} 66 : TiledLayerImpl(tree_impl, id) {}
67 67
68 FakeTiledLayerImpl::~FakeTiledLayerImpl() {} 68 FakeTiledLayerImpl::~FakeTiledLayerImpl() {}
69 69
70 FakeTiledLayer::FakeTiledLayer(PrioritizedResourceManager* resource_manager) 70 FakeTiledLayer::FakeTiledLayer(PrioritizedResourceManager* resource_manager)
71 : TiledLayer(), 71 : TiledLayer(),
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 float* contents_scale_y, 157 float* contents_scale_y,
158 gfx::Size* content_bounds) { 158 gfx::Size* content_bounds) {
159 *contents_scale_x = 159 *contents_scale_x =
160 static_cast<float>(forced_content_bounds_.width()) / bounds().width(); 160 static_cast<float>(forced_content_bounds_.width()) / bounds().width();
161 *contents_scale_y = 161 *contents_scale_y =
162 static_cast<float>(forced_content_bounds_.height()) / bounds().height(); 162 static_cast<float>(forced_content_bounds_.height()) / bounds().height();
163 *content_bounds = forced_content_bounds_; 163 *content_bounds = forced_content_bounds_;
164 } 164 }
165 165
166 } // namespace cc 166 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_web_graphics_context_3d.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698