| 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 <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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), | 149 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), |
| 150 GL_TEXTURE_2D, RGBA_8888); | 150 GL_TEXTURE_2D, RGBA_8888); |
| 151 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( | 151 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( |
| 152 base::MessageLoopProxy::current().get(), | 152 base::MessageLoopProxy::current().get(), |
| 153 TileTaskWorkerPool::GetTaskGraphRunner(), context_provider_.get(), | 153 TileTaskWorkerPool::GetTaskGraphRunner(), context_provider_.get(), |
| 154 resource_provider_.get(), staging_resource_pool_.get()); | 154 resource_provider_.get(), staging_resource_pool_.get()); |
| 155 break; | 155 break; |
| 156 case TILE_TASK_WORKER_POOL_TYPE_GPU: | 156 case TILE_TASK_WORKER_POOL_TYPE_GPU: |
| 157 Create3dOutputSurfaceAndResourceProvider(); | 157 Create3dOutputSurfaceAndResourceProvider(); |
| 158 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( | 158 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( |
| 159 base::MessageLoopProxy::current().get(), context_provider_.get(), | 159 base::MessageLoopProxy::current().get(), |
| 160 resource_provider_.get(), false); | 160 TileTaskWorkerPool::GetTaskGraphRunner()); |
| 161 break; | 161 break; |
| 162 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: | 162 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: |
| 163 CreateSoftwareOutputSurfaceAndResourceProvider(); | 163 CreateSoftwareOutputSurfaceAndResourceProvider(); |
| 164 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( | 164 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( |
| 165 base::MessageLoopProxy::current().get(), | 165 base::MessageLoopProxy::current().get(), |
| 166 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get()); | 166 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get()); |
| 167 break; | 167 break; |
| 168 } | 168 } |
| 169 | 169 |
| 170 DCHECK(tile_task_worker_pool_); | 170 DCHECK(tile_task_worker_pool_); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 TileTaskWorkerPoolTests, | 379 TileTaskWorkerPoolTests, |
| 380 TileTaskWorkerPoolTest, | 380 TileTaskWorkerPoolTest, |
| 381 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, | 381 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, |
| 382 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, | 382 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, |
| 383 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, | 383 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, |
| 384 TILE_TASK_WORKER_POOL_TYPE_GPU, | 384 TILE_TASK_WORKER_POOL_TYPE_GPU, |
| 385 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); | 385 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); |
| 386 | 386 |
| 387 } // namespace | 387 } // namespace |
| 388 } // namespace cc | 388 } // namespace cc |
| OLD | NEW |