OLD | NEW |
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 "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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 break; | 250 break; |
251 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: | 251 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: |
252 Create3dOutputSurfaceAndResourceProvider(); | 252 Create3dOutputSurfaceAndResourceProvider(); |
253 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create( | 253 tile_task_worker_pool_ = ZeroCopyTileTaskWorkerPool::Create( |
254 task_runner_.get(), task_graph_runner_.get(), | 254 task_runner_.get(), task_graph_runner_.get(), |
255 resource_provider_.get()); | 255 resource_provider_.get()); |
256 break; | 256 break; |
257 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY: | 257 case TILE_TASK_WORKER_POOL_TYPE_ONE_COPY: |
258 Create3dOutputSurfaceAndResourceProvider(); | 258 Create3dOutputSurfaceAndResourceProvider(); |
259 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), | 259 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), |
260 GL_TEXTURE_2D, RGBA_8888); | 260 GL_TEXTURE_2D); |
261 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( | 261 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( |
262 task_runner_.get(), task_graph_runner_.get(), | 262 task_runner_.get(), task_graph_runner_.get(), |
263 context_provider_.get(), resource_provider_.get(), | 263 context_provider_.get(), resource_provider_.get(), |
264 staging_resource_pool_.get()); | 264 staging_resource_pool_.get()); |
265 break; | 265 break; |
266 case TILE_TASK_WORKER_POOL_TYPE_GPU: | 266 case TILE_TASK_WORKER_POOL_TYPE_GPU: |
267 Create3dOutputSurfaceAndResourceProvider(); | 267 Create3dOutputSurfaceAndResourceProvider(); |
268 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( | 268 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( |
269 task_runner_.get(), task_graph_runner_.get()); | 269 task_runner_.get(), task_graph_runner_.get(), RGBA_8888); |
270 break; | 270 break; |
271 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: | 271 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: |
272 CreateSoftwareOutputSurfaceAndResourceProvider(); | 272 CreateSoftwareOutputSurfaceAndResourceProvider(); |
273 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( | 273 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( |
274 task_runner_.get(), task_graph_runner_.get(), | 274 task_runner_.get(), task_graph_runner_.get(), |
275 resource_provider_.get()); | 275 resource_provider_.get()); |
276 break; | 276 break; |
277 } | 277 } |
278 | 278 |
279 DCHECK(tile_task_worker_pool_); | 279 DCHECK(tile_task_worker_pool_); |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 RunBuildTileTaskQueueTest("1_0", 1, 0); | 503 RunBuildTileTaskQueueTest("1_0", 1, 0); |
504 RunBuildTileTaskQueueTest("32_0", 32, 0); | 504 RunBuildTileTaskQueueTest("32_0", 32, 0); |
505 RunBuildTileTaskQueueTest("1_1", 1, 1); | 505 RunBuildTileTaskQueueTest("1_1", 1, 1); |
506 RunBuildTileTaskQueueTest("32_1", 32, 1); | 506 RunBuildTileTaskQueueTest("32_1", 32, 1); |
507 RunBuildTileTaskQueueTest("1_4", 1, 4); | 507 RunBuildTileTaskQueueTest("1_4", 1, 4); |
508 RunBuildTileTaskQueueTest("32_4", 32, 4); | 508 RunBuildTileTaskQueueTest("32_4", 32, 4); |
509 } | 509 } |
510 | 510 |
511 } // namespace | 511 } // namespace |
512 } // namespace cc | 512 } // namespace cc |
OLD | NEW |