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

Side by Side Diff: cc/raster/tile_task_worker_pool_perftest.cc

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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/raster/tile_task_worker_pool.h" 5 #include "cc/raster/tile_task_worker_pool.h"
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "cc/debug/lap_timer.h" 9 #include "cc/debug/lap_timer.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 std::numeric_limits<size_t>::max()); 258 std::numeric_limits<size_t>::max());
259 break; 259 break;
260 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: 260 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY:
261 Create3dOutputSurfaceAndResourceProvider(); 261 Create3dOutputSurfaceAndResourceProvider();
262 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create( 262 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create(
263 task_runner_.get(), task_graph_runner_.get(), 263 task_runner_.get(), task_graph_runner_.get(),
264 resource_provider_.get()); 264 resource_provider_.get());
265 break; 265 break;
266 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY: 266 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY:
267 Create3dOutputSurfaceAndResourceProvider(); 267 Create3dOutputSurfaceAndResourceProvider();
268 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(),
269 GL_TEXTURE_2D);
268 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( 270 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create(
269 task_runner_.get(), task_graph_runner_.get(), 271 task_runner_.get(), task_graph_runner_.get(),
270 context_provider_.get(), resource_provider_.get(), 272 context_provider_.get(), resource_provider_.get(),
271 std::numeric_limits<int>::max(), false, GL_TEXTURE_2D, 273 staging_resource_pool_.get(), std::numeric_limits<int>::max(),
272 std::numeric_limits<int>::max()); 274 false);
273 break; 275 break;
274 case TILE_TASK_WORKER_POOL_TYPE_GPU: 276 case TILE_TASK_WORKER_POOL_TYPE_GPU:
275 Create3dOutputSurfaceAndResourceProvider(); 277 Create3dOutputSurfaceAndResourceProvider();
276 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( 278 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create(
277 task_runner_.get(), task_graph_runner_.get(), 279 task_runner_.get(), task_graph_runner_.get(),
278 context_provider_.get(), resource_provider_.get(), false, 0); 280 context_provider_.get(), resource_provider_.get(), false, 0);
279 break; 281 break;
280 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: 282 case TILE_TASK_WORKER_POOL_TYPE_BITMAP:
281 CreateSoftwareOutputSurfaceAndResourceProvider(); 283 CreateSoftwareOutputSurfaceAndResourceProvider();
282 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( 284 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 return std::string("_one_copy_tile_task_worker_pool"); 424 return std::string("_one_copy_tile_task_worker_pool");
423 case TILE_TASK_WORKER_POOL_TYPE_GPU: 425 case TILE_TASK_WORKER_POOL_TYPE_GPU:
424 return std::string("_gpu_tile_task_worker_pool"); 426 return std::string("_gpu_tile_task_worker_pool");
425 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: 427 case TILE_TASK_WORKER_POOL_TYPE_BITMAP:
426 return std::string("_bitmap_tile_task_worker_pool"); 428 return std::string("_bitmap_tile_task_worker_pool");
427 } 429 }
428 NOTREACHED(); 430 NOTREACHED();
429 return std::string(); 431 return std::string();
430 } 432 }
431 433
434 scoped_ptr<ResourcePool> staging_resource_pool_;
432 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; 435 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_;
433 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; 436 TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
434 TestSharedBitmapManager shared_bitmap_manager_; 437 TestSharedBitmapManager shared_bitmap_manager_;
435 }; 438 };
436 439
437 TEST_P(TileTaskWorkerPoolPerfTest, ScheduleTasks) { 440 TEST_P(TileTaskWorkerPoolPerfTest, ScheduleTasks) {
438 RunScheduleTasksTest("1_0", 1, 0); 441 RunScheduleTasksTest("1_0", 1, 0);
439 RunScheduleTasksTest("32_0", 32, 0); 442 RunScheduleTasksTest("32_0", 32, 0);
440 RunScheduleTasksTest("1_1", 1, 1); 443 RunScheduleTasksTest("1_1", 1, 1);
441 RunScheduleTasksTest("32_1", 32, 1); 444 RunScheduleTasksTest("32_1", 32, 1);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 RunBuildTileTaskQueueTest("1_0", 1, 0); 511 RunBuildTileTaskQueueTest("1_0", 1, 0);
509 RunBuildTileTaskQueueTest("32_0", 32, 0); 512 RunBuildTileTaskQueueTest("32_0", 32, 0);
510 RunBuildTileTaskQueueTest("1_1", 1, 1); 513 RunBuildTileTaskQueueTest("1_1", 1, 1);
511 RunBuildTileTaskQueueTest("32_1", 32, 1); 514 RunBuildTileTaskQueueTest("32_1", 32, 1);
512 RunBuildTileTaskQueueTest("1_4", 1, 4); 515 RunBuildTileTaskQueueTest("1_4", 1, 4);
513 RunBuildTileTaskQueueTest("32_4", 32, 4); 516 RunBuildTileTaskQueueTest("32_4", 32, 4);
514 } 517 }
515 518
516 } // namespace 519 } // namespace
517 } // namespace cc 520 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/one_copy_tile_task_worker_pool.cc ('k') | cc/raster/tile_task_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698