| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), | 154 staging_resource_pool_ = ResourcePool::Create(resource_provider_.get(), |
| 155 GL_TEXTURE_2D, RGBA_8888); | 155 GL_TEXTURE_2D, RGBA_8888); |
| 156 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( | 156 tile_task_worker_pool_ = OneCopyTileTaskWorkerPool::Create( |
| 157 base::MessageLoopProxy::current().get(), | 157 base::MessageLoopProxy::current().get(), |
| 158 TileTaskWorkerPool::GetTaskGraphRunner(), context_provider_.get(), | 158 TileTaskWorkerPool::GetTaskGraphRunner(), context_provider_.get(), |
| 159 resource_provider_.get(), staging_resource_pool_.get()); | 159 resource_provider_.get(), staging_resource_pool_.get()); |
| 160 break; | 160 break; |
| 161 case TILE_TASK_WORKER_POOL_TYPE_GPU: | 161 case TILE_TASK_WORKER_POOL_TYPE_GPU: |
| 162 Create3dOutputSurfaceAndResourceProvider(); | 162 Create3dOutputSurfaceAndResourceProvider(); |
| 163 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( | 163 tile_task_worker_pool_ = GpuTileTaskWorkerPool::Create( |
| 164 base::MessageLoopProxy::current().get(), context_provider_.get(), | 164 base::MessageLoopProxy::current().get(), |
| 165 resource_provider_.get(), false); | 165 TileTaskWorkerPool::GetTaskGraphRunner()); |
| 166 break; | 166 break; |
| 167 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: | 167 case TILE_TASK_WORKER_POOL_TYPE_BITMAP: |
| 168 CreateSoftwareOutputSurfaceAndResourceProvider(); | 168 CreateSoftwareOutputSurfaceAndResourceProvider(); |
| 169 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( | 169 tile_task_worker_pool_ = BitmapTileTaskWorkerPool::Create( |
| 170 base::MessageLoopProxy::current().get(), | 170 base::MessageLoopProxy::current().get(), |
| 171 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get()); | 171 TileTaskWorkerPool::GetTaskGraphRunner(), resource_provider_.get()); |
| 172 break; | 172 break; |
| 173 } | 173 } |
| 174 | 174 |
| 175 DCHECK(tile_task_worker_pool_); | 175 DCHECK(tile_task_worker_pool_); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 TileTaskWorkerPoolTests, | 389 TileTaskWorkerPoolTests, |
| 390 TileTaskWorkerPoolTest, | 390 TileTaskWorkerPoolTest, |
| 391 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, | 391 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, |
| 392 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, | 392 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, |
| 393 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, | 393 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, |
| 394 TILE_TASK_WORKER_POOL_TYPE_GPU, | 394 TILE_TASK_WORKER_POOL_TYPE_GPU, |
| 395 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); | 395 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); |
| 396 | 396 |
| 397 } // namespace | 397 } // namespace |
| 398 } // namespace cc | 398 } // namespace cc |
| OLD | NEW |