| 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/raster_worker_pool.h" | 5 #include "cc/resources/raster_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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 resource_provider_.get()); | 134 resource_provider_.get()); |
| 135 break; | 135 break; |
| 136 case RASTER_WORKER_POOL_TYPE_IMAGE_COPY: | 136 case RASTER_WORKER_POOL_TYPE_IMAGE_COPY: |
| 137 raster_worker_pool_ = ImageCopyRasterWorkerPool::Create( | 137 raster_worker_pool_ = ImageCopyRasterWorkerPool::Create( |
| 138 base::MessageLoopProxy::current().get(), | 138 base::MessageLoopProxy::current().get(), |
| 139 RasterWorkerPool::GetTaskGraphRunner(), | 139 RasterWorkerPool::GetTaskGraphRunner(), |
| 140 resource_provider_.get(), | 140 resource_provider_.get(), |
| 141 staging_resource_pool_.get()); | 141 staging_resource_pool_.get()); |
| 142 break; | 142 break; |
| 143 case RASTER_WORKER_POOL_TYPE_GPU: | 143 case RASTER_WORKER_POOL_TYPE_GPU: |
| 144 raster_worker_pool_ = | 144 raster_worker_pool_ = GpuRasterWorkerPool::Create( |
| 145 GpuRasterWorkerPool::Create(base::MessageLoopProxy::current().get(), | 145 base::MessageLoopProxy::current().get(), resource_provider_.get()); |
| 146 resource_provider_.get(), | |
| 147 context_provider_.get()); | |
| 148 break; | 146 break; |
| 149 } | 147 } |
| 150 | 148 |
| 151 DCHECK(raster_worker_pool_); | 149 DCHECK(raster_worker_pool_); |
| 152 raster_worker_pool_->AsRasterizer()->SetClient(this); | 150 raster_worker_pool_->AsRasterizer()->SetClient(this); |
| 153 } | 151 } |
| 154 virtual ~RasterWorkerPoolTest() { | 152 virtual ~RasterWorkerPoolTest() { |
| 155 staging_resource_pool_.reset(); | 153 staging_resource_pool_.reset(); |
| 156 resource_provider_.reset(); | 154 resource_provider_.reset(); |
| 157 } | 155 } |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 322 |
| 325 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, | 323 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, |
| 326 RasterWorkerPoolTest, | 324 RasterWorkerPoolTest, |
| 327 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, | 325 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, |
| 328 RASTER_WORKER_POOL_TYPE_IMAGE, | 326 RASTER_WORKER_POOL_TYPE_IMAGE, |
| 329 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, | 327 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, |
| 330 RASTER_WORKER_POOL_TYPE_GPU)); | 328 RASTER_WORKER_POOL_TYPE_GPU)); |
| 331 | 329 |
| 332 } // namespace | 330 } // namespace |
| 333 } // namespace cc | 331 } // namespace cc |
| OLD | NEW |