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

Side by Side Diff: cc/test/pixel_test.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/layer_tree_test.cc ('k') | cc/test/render_pass_test_utils.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/test/pixel_test.h" 5 #include "cc/test/pixel_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 false); 124 false);
125 125
126 texture_mailbox_deleter_ = make_scoped_ptr( 126 texture_mailbox_deleter_ = make_scoped_ptr(
127 new TextureMailboxDeleter(base::MessageLoopProxy::current())); 127 new TextureMailboxDeleter(base::MessageLoopProxy::current()));
128 128
129 renderer_ = GLRenderer::Create(this, 129 renderer_ = GLRenderer::Create(this,
130 &settings_, 130 &settings_,
131 output_surface_.get(), 131 output_surface_.get(),
132 resource_provider_.get(), 132 resource_provider_.get(),
133 texture_mailbox_deleter_.get(), 133 texture_mailbox_deleter_.get(),
134 0).PassAs<DirectRenderer>(); 134 0);
135 } 135 }
136 136
137 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { 137 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) {
138 static_cast<PixelTestOutputSurface*>(output_surface_.get()) 138 static_cast<PixelTestOutputSurface*>(output_surface_.get())
139 ->set_surface_expansion_size(surface_expansion); 139 ->set_surface_expansion_size(surface_expansion);
140 SoftwareOutputDevice* device = output_surface_->software_device(); 140 SoftwareOutputDevice* device = output_surface_->software_device();
141 if (device) { 141 if (device) {
142 static_cast<PixelTestSoftwareOutputDevice*>(device) 142 static_cast<PixelTestSoftwareOutputDevice*>(device)
143 ->set_surface_expansion_size(surface_expansion); 143 ->set_surface_expansion_size(surface_expansion);
144 } 144 }
(...skipping 17 matching lines...) Expand all
162 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 162 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
163 output_surface_->BindToClient(output_surface_client_.get()); 163 output_surface_->BindToClient(output_surface_client_.get());
164 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 164 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
165 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 165 resource_provider_ = ResourceProvider::Create(output_surface_.get(),
166 shared_bitmap_manager_.get(), 166 shared_bitmap_manager_.get(),
167 main_thread_task_runner_.get(), 167 main_thread_task_runner_.get(),
168 0, 168 0,
169 false, 169 false,
170 1, 170 1,
171 false); 171 false);
172 renderer_ = 172 renderer_ = SoftwareRenderer::Create(
173 SoftwareRenderer::Create( 173 this, &settings_, output_surface_.get(), resource_provider_.get());
174 this, &settings_, output_surface_.get(), resource_provider_.get())
175 .PassAs<DirectRenderer>();
176 } 174 }
177 175
178 } // namespace cc 176 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/render_pass_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698