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

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

Issue 49163004: cc: Reduce command buffer flushes related to creating texture ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/test/test_web_graphics_context_3d.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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 161 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) {
162 CHECK(fake_client_); 162 CHECK(fake_client_);
163 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 163 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL));
164 164
165 using webkit::gpu::ContextProviderInProcess; 165 using webkit::gpu::ContextProviderInProcess;
166 output_surface_.reset(new PixelTestOutputSurface( 166 output_surface_.reset(new PixelTestOutputSurface(
167 ContextProviderInProcess::CreateOffscreen())); 167 ContextProviderInProcess::CreateOffscreen()));
168 output_surface_->BindToClient(fake_client_.get()); 168 output_surface_->BindToClient(fake_client_.get());
169 169
170 resource_provider_ = 170 resource_provider_ =
171 ResourceProvider::Create(output_surface_.get(), NULL, 0, false); 171 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
172 172
173 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); 173 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter);
174 174
175 renderer_ = GLRenderer::Create(fake_client_.get(), 175 renderer_ = GLRenderer::Create(fake_client_.get(),
176 &settings_, 176 &settings_,
177 output_surface_.get(), 177 output_surface_.get(),
178 resource_provider_.get(), 178 resource_provider_.get(),
179 texture_mailbox_deleter_.get(), 179 texture_mailbox_deleter_.get(),
180 0, 180 0,
181 use_skia_gpu_backend).PassAs<DirectRenderer>(); 181 use_skia_gpu_backend).PassAs<DirectRenderer>();
(...skipping 22 matching lines...) Expand all
204 ->set_has_external_stencil_test(true); 204 ->set_has_external_stencil_test(true);
205 } 205 }
206 206
207 void PixelTest::SetUpSoftwareRenderer() { 207 void PixelTest::SetUpSoftwareRenderer() {
208 CHECK(fake_client_); 208 CHECK(fake_client_);
209 209
210 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); 210 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice());
211 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 211 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
212 output_surface_->BindToClient(fake_client_.get()); 212 output_surface_->BindToClient(fake_client_.get());
213 resource_provider_ = 213 resource_provider_ =
214 ResourceProvider::Create(output_surface_.get(), NULL, 0, false); 214 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
215 renderer_ = SoftwareRenderer::Create(fake_client_.get(), 215 renderer_ = SoftwareRenderer::Create(fake_client_.get(),
216 &settings_, 216 &settings_,
217 output_surface_.get(), 217 output_surface_.get(),
218 resource_provider_.get()) 218 resource_provider_.get())
219 .PassAs<DirectRenderer>(); 219 .PassAs<DirectRenderer>();
220 } 220 }
221 221
222 } // namespace cc 222 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698