| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return resource_provider_.get(); | 97 return resource_provider_.get(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 RasterWorkerPool* worker_pool() { | 100 RasterWorkerPool* worker_pool() { |
| 101 return raster_worker_pool_.get(); | 101 return raster_worker_pool_.get(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void RunTest(bool use_map_image) { | 104 void RunTest(bool use_map_image) { |
| 105 if (use_map_image) { | 105 if (use_map_image) { |
| 106 raster_worker_pool_ = ImageRasterWorkerPool::Create( | 106 raster_worker_pool_ = ImageRasterWorkerPool::Create( |
| 107 resource_provider(), 1, GL_TEXTURE_2D); | 107 resource_provider(), GL_TEXTURE_2D); |
| 108 } else { | 108 } else { |
| 109 raster_worker_pool_ = | 109 raster_worker_pool_ = |
| 110 PixelBufferRasterWorkerPool::Create( | 110 PixelBufferRasterWorkerPool::Create( |
| 111 resource_provider(), | 111 resource_provider(), |
| 112 1, | |
| 113 std::numeric_limits<size_t>::max()); | 112 std::numeric_limits<size_t>::max()); |
| 114 } | 113 } |
| 115 | 114 |
| 116 raster_worker_pool_->SetClient(this); | 115 raster_worker_pool_->SetClient(this); |
| 117 | 116 |
| 118 BeginTest(); | 117 BeginTest(); |
| 119 | 118 |
| 120 ScheduleCheckForCompletedTasks(); | 119 ScheduleCheckForCompletedTasks(); |
| 121 | 120 |
| 122 if (timeout_seconds_) { | 121 if (timeout_seconds_) { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 ASSERT_EQ(1u, tasks_.size()); | 282 ASSERT_EQ(1u, tasks_.size()); |
| 284 tasks_.clear(); | 283 tasks_.clear(); |
| 285 } | 284 } |
| 286 }; | 285 }; |
| 287 | 286 |
| 288 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFailedMapResource); | 287 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFailedMapResource); |
| 289 | 288 |
| 290 } // namespace | 289 } // namespace |
| 291 | 290 |
| 292 } // namespace cc | 291 } // namespace cc |
| OLD | NEW |