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 <vector> | 8 #include <vector> |
8 | 9 |
9 #include "cc/debug/test_web_graphics_context_3d.h" | 10 #include "cc/debug/test_web_graphics_context_3d.h" |
10 #include "cc/resources/image_raster_worker_pool.h" | 11 #include "cc/resources/image_raster_worker_pool.h" |
11 #include "cc/resources/picture_pile.h" | 12 #include "cc/resources/picture_pile.h" |
12 #include "cc/resources/picture_pile_impl.h" | 13 #include "cc/resources/picture_pile_impl.h" |
13 #include "cc/resources/pixel_buffer_raster_worker_pool.h" | 14 #include "cc/resources/pixel_buffer_raster_worker_pool.h" |
14 #include "cc/resources/resource_provider.h" | 15 #include "cc/resources/resource_provider.h" |
15 #include "cc/resources/scoped_resource.h" | 16 #include "cc/resources/scoped_resource.h" |
16 #include "cc/test/fake_output_surface.h" | 17 #include "cc/test/fake_output_surface.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 RasterWorkerPool* worker_pool() { | 98 RasterWorkerPool* worker_pool() { |
98 return raster_worker_pool_.get(); | 99 return raster_worker_pool_.get(); |
99 } | 100 } |
100 | 101 |
101 void RunTest(bool use_map_image) { | 102 void RunTest(bool use_map_image) { |
102 if (use_map_image) { | 103 if (use_map_image) { |
103 raster_worker_pool_ = ImageRasterWorkerPool::Create( | 104 raster_worker_pool_ = ImageRasterWorkerPool::Create( |
104 resource_provider(), 1); | 105 resource_provider(), 1); |
105 } else { | 106 } else { |
106 raster_worker_pool_ = PixelBufferRasterWorkerPool::Create( | 107 raster_worker_pool_ = PixelBufferRasterWorkerPool::Create( |
107 resource_provider(), 1); | 108 resource_provider(), 1, std::numeric_limits<size_t>::max()); |
108 } | 109 } |
109 | 110 |
110 raster_worker_pool_->SetClient(this); | 111 raster_worker_pool_->SetClient(this); |
111 | 112 |
112 BeginTest(); | 113 BeginTest(); |
113 | 114 |
114 ScheduleCheckForCompletedTasks(); | 115 ScheduleCheckForCompletedTasks(); |
115 | 116 |
116 if (timeout_seconds_) { | 117 if (timeout_seconds_) { |
117 timeout_.Reset(base::Bind(&RasterWorkerPoolTest::OnTimeout, | 118 timeout_.Reset(base::Bind(&RasterWorkerPoolTest::OnTimeout, |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 ASSERT_EQ(1u, tasks_.size()); | 278 ASSERT_EQ(1u, tasks_.size()); |
278 tasks_.clear(); | 279 tasks_.clear(); |
279 } | 280 } |
280 }; | 281 }; |
281 | 282 |
282 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFailedMapResource); | 283 PIXEL_BUFFER_AND_IMAGE_TEST_F(RasterWorkerPoolTestFailedMapResource); |
283 | 284 |
284 } // namespace | 285 } // namespace |
285 | 286 |
286 } // namespace cc | 287 } // namespace cc |
OLD | NEW |