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

Side by Side Diff: cc/test/pixel_test.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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/pixel_test.h ('k') | cc/test/render_pass_test_utils.h » ('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/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (device) { 144 if (device) {
145 static_cast<PixelTestSoftwareOutputDevice*>(device) 145 static_cast<PixelTestSoftwareOutputDevice*>(device)
146 ->set_surface_expansion_size(surface_expansion); 146 ->set_surface_expansion_size(surface_expansion);
147 } 147 }
148 } 148 }
149 149
150 void PixelTest::ForceViewportOffset(gfx::Vector2d viewport_offset) { 150 void PixelTest::ForceViewportOffset(gfx::Vector2d viewport_offset) {
151 external_device_viewport_offset_ = viewport_offset; 151 external_device_viewport_offset_ = viewport_offset;
152 } 152 }
153 153
154 void PixelTest::ForceDeviceClip(gfx::Rect clip) { 154 void PixelTest::ForceDeviceClip(const gfx::Rect& clip) {
155 external_device_clip_rect_ = clip; 155 external_device_clip_rect_ = clip;
156 } 156 }
157 157
158 void PixelTest::EnableExternalStencilTest() { 158 void PixelTest::EnableExternalStencilTest() {
159 static_cast<PixelTestOutputSurface*>(output_surface_.get()) 159 static_cast<PixelTestOutputSurface*>(output_surface_.get())
160 ->set_has_external_stencil_test(true); 160 ->set_has_external_stencil_test(true);
161 } 161 }
162 162
163 void PixelTest::SetUpSoftwareRenderer() { 163 void PixelTest::SetUpSoftwareRenderer() {
164 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); 164 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice());
165 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 165 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
166 output_surface_->BindToClient(output_surface_client_.get()); 166 output_surface_->BindToClient(output_surface_client_.get());
167 resource_provider_ = 167 resource_provider_ =
168 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 168 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
169 renderer_ = SoftwareRenderer::Create( 169 renderer_ = SoftwareRenderer::Create(
170 this, &settings_, output_surface_.get(), resource_provider_.get()) 170 this, &settings_, output_surface_.get(), resource_provider_.get())
171 .PassAs<DirectRenderer>(); 171 .PassAs<DirectRenderer>();
172 } 172 }
173 173
174 } // namespace cc 174 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.h ('k') | cc/test/render_pass_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698