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

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

Issue 147603006: [#7] Resubmitted - Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmit 145313006 Created 6 years, 10 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/pixel_test_output_surface.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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); 130 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter);
131 131
132 renderer_ = GLRenderer::Create(this, 132 renderer_ = GLRenderer::Create(this,
133 &settings_, 133 &settings_,
134 output_surface_.get(), 134 output_surface_.get(),
135 resource_provider_.get(), 135 resource_provider_.get(),
136 texture_mailbox_deleter_.get(), 136 texture_mailbox_deleter_.get(),
137 0).PassAs<DirectRenderer>(); 137 0).PassAs<DirectRenderer>();
138 } 138 }
139 139
140 void PixelTest::ForceExpandedViewport(gfx::Size surface_expansion) { 140 void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) {
141 static_cast<PixelTestOutputSurface*>(output_surface_.get()) 141 static_cast<PixelTestOutputSurface*>(output_surface_.get())
142 ->set_surface_expansion_size(surface_expansion); 142 ->set_surface_expansion_size(surface_expansion);
143 SoftwareOutputDevice* device = output_surface_->software_device(); 143 SoftwareOutputDevice* device = output_surface_->software_device();
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) {
(...skipping 14 matching lines...) Expand all
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/pixel_test_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698