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

Side by Side Diff: cc/resources/tile_task_worker_pool_unittest.cc

Issue 1063493002: cc: Remove all traces of synchronous GPU rasterization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 8 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/resources/tile_task_worker_pool_perftest.cc ('k') | cc/test/fake_tile_manager.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/resources/tile_task_worker_pool.h" 5 #include "cc/resources/tile_task_worker_pool.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Create3dOutputSurfaceAndResourceProvider(); 157 Create3dOutputSurfaceAndResourceProvider();
158 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), 158 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(),
159 GL_TEXTURE_2D); 159 GL_TEXTURE_2D);
160 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( 160 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create(
161 base::MessageLoopProxy::current().get(), &task_graph_runner_, 161 base::MessageLoopProxy::current().get(), &task_graph_runner_,
162 context_provider_.get(), resource_provider_.get(), 162 context_provider_.get(), resource_provider_.get(),
163 staging_resource_pool_.get()); 163 staging_resource_pool_.get());
164 break; 164 break;
165 case TILE_TASK_WORKER_POOL_TYPE_GPU: 165 case TILE_TASK_WORKER_POOL_TYPE_GPU:
166 Create3dOutputSurfaceAndResourceProvider(); 166 Create3dOutputSurfaceAndResourceProvider();
167 rasterizer_ = GpuRasterizer::Create(
168 context_provider_.get(), resource_provider_.get(), false, false, 0);
169 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( 167 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create(
170 base::MessageLoopProxy::current().get(), &task_graph_runner_, 168 base::MessageLoopProxy::current().get(), &task_graph_runner_,
171 static_cast<GpuRasterizer*>(rasterizer_.get())); 169 context_provider_.get(), resource_provider_.get(), false, 0);
172 break; 170 break;
173 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: 171 case TILE_TASK_WORKER_POOL_TYPE_BITMAP:
174 CreateSoftwareOutputSurfaceAndResourceProvider(); 172 CreateSoftwareOutputSurfaceAndResourceProvider();
175 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( 173 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create(
176 base::MessageLoopProxy::current().get(), &task_graph_runner_, 174 base::MessageLoopProxy::current().get(), &task_graph_runner_,
177 resource_provider_.get()); 175 resource_provider_.get());
178 break; 176 break;
179 } 177 }
180 178
181 DCHECK(tile_task_worker_pool_); 179 DCHECK(tile_task_worker_pool_);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 314 }
317 315
318 void OnTimeout() { 316 void OnTimeout() {
319 timed_out_ = true; 317 timed_out_ = true;
320 base::MessageLoop::current()->Quit(); 318 base::MessageLoop::current()->Quit();
321 } 319 }
322 320
323 protected: 321 protected:
324 scoped_refptr<TestContextProvider> context_provider_; 322 scoped_refptr<TestContextProvider> context_provider_;
325 scoped_refptr<TestContextProvider> worker_context_provider_; 323 scoped_refptr<TestContextProvider> worker_context_provider_;
326 scoped_ptr<Rasterizer> rasterizer_;
327 FakeOutputSurfaceClient output_surface_client_; 324 FakeOutputSurfaceClient output_surface_client_;
328 scoped_ptr<FakeOutputSurface> output_surface_; 325 scoped_ptr<FakeOutputSurface> output_surface_;
329 scoped_ptr<ResourceProvider> resource_provider_; 326 scoped_ptr<ResourceProvider> resource_provider_;
330 scoped_ptr<ResourcePool> staging_resource_pool_; 327 scoped_ptr<ResourcePool> staging_resource_pool_;
331 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; 328 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
332 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; 329 TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
333 TestSharedBitmapManager shared_bitmap_manager_; 330 TestSharedBitmapManager shared_bitmap_manager_;
334 TestTaskGraphRunner task_graph_runner_; 331 TestTaskGraphRunner task_graph_runner_;
335 base::CancelableClosure timeout_; 332 base::CancelableClosure timeout_;
336 UniqueNotifier all_tile_tasks_finished_; 333 UniqueNotifier all_tile_tasks_finished_;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 TileTaskWorkerPoolTests, 430 TileTaskWorkerPoolTests,
434 TileTaskWorkerPoolTest, 431 TileTaskWorkerPoolTest,
435 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, 432 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER,
436 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 433 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
437 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 434 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
438 TILE_TASK_WORKER_POOL_TYPE_GPU, 435 TILE_TASK_WORKER_POOL_TYPE_GPU,
439 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 436 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
440 437
441 } // namespace 438 } // namespace
442 } // namespace cc 439 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_task_worker_pool_perftest.cc ('k') | cc/test/fake_tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698