| 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 "cc/resources/image_raster_worker_pool.h" | 10 #include "cc/resources/image_raster_worker_pool.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return resource_provider_.get(); | 144 return resource_provider_.get(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 RasterWorkerPool* worker_pool() { | 147 RasterWorkerPool* worker_pool() { |
| 148 return raster_worker_pool_.get(); | 148 return raster_worker_pool_.get(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void RunTest(bool use_map_image) { | 151 void RunTest(bool use_map_image) { |
| 152 if (use_map_image) { | 152 if (use_map_image) { |
| 153 raster_worker_pool_ = ImageRasterWorkerPool::Create( | 153 raster_worker_pool_ = ImageRasterWorkerPool::Create( |
| 154 resource_provider(), context_provider_.get(), 1, GL_TEXTURE_2D); | 154 resource_provider(), context_provider_.get(), GL_TEXTURE_2D); |
| 155 } else { | 155 } else { |
| 156 raster_worker_pool_ = | 156 raster_worker_pool_ = |
| 157 PixelBufferRasterWorkerPool::Create( | 157 PixelBufferRasterWorkerPool::Create( |
| 158 resource_provider(), | 158 resource_provider(), |
| 159 context_provider_.get(), | 159 context_provider_.get(), |
| 160 1, | |
| 161 std::numeric_limits<size_t>::max()); | 160 std::numeric_limits<size_t>::max()); |
| 162 } | 161 } |
| 163 | 162 |
| 164 raster_worker_pool_->SetClient(this); | 163 raster_worker_pool_->SetClient(this); |
| 165 | 164 |
| 166 BeginTest(); | 165 BeginTest(); |
| 167 | 166 |
| 168 ScheduleCheckForCompletedTasks(); | 167 ScheduleCheckForCompletedTasks(); |
| 169 | 168 |
| 170 if (timeout_seconds_) { | 169 if (timeout_seconds_) { |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 } | 462 } |
| 464 | 463 |
| 465 base::Lock lock_; | 464 base::Lock lock_; |
| 466 }; | 465 }; |
| 467 | 466 |
| 468 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFalseThrottling); | 467 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFalseThrottling); |
| 469 | 468 |
| 470 } // namespace | 469 } // namespace |
| 471 | 470 |
| 472 } // namespace cc | 471 } // namespace cc |
| OLD | NEW |