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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 typedef std::vector<scoped_refptr<RasterTask> > RasterTaskVector; | 110 typedef std::vector<scoped_refptr<RasterTask> > RasterTaskVector; |
111 | 111 |
112 RasterWorkerPoolTest() | 112 RasterWorkerPoolTest() |
113 : context_provider_(TestContextProvider::Create()), | 113 : context_provider_(TestContextProvider::Create()), |
114 timeout_seconds_(5), | 114 timeout_seconds_(5), |
115 timed_out_(false) { | 115 timed_out_(false) { |
116 output_surface_ = FakeOutputSurface::Create3d(context_provider_).Pass(); | 116 output_surface_ = FakeOutputSurface::Create3d(context_provider_).Pass(); |
117 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 117 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
118 | 118 |
119 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 119 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
120 resource_provider_ = | 120 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
121 ResourceProvider::Create( | 121 shared_bitmap_manager_.get(), |
122 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, | 122 NULL, |
123 false).Pass(); | 123 0, |
| 124 false, |
| 125 1, |
| 126 false).Pass(); |
124 staging_resource_pool_ = ResourcePool::Create( | 127 staging_resource_pool_ = ResourcePool::Create( |
125 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 128 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
126 | 129 |
127 switch (GetParam()) { | 130 switch (GetParam()) { |
128 case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER: | 131 case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER: |
129 raster_worker_pool_ = PixelBufferRasterWorkerPool::Create( | 132 raster_worker_pool_ = PixelBufferRasterWorkerPool::Create( |
130 base::MessageLoopProxy::current().get(), | 133 base::MessageLoopProxy::current().get(), |
131 RasterWorkerPool::GetTaskGraphRunner(), | 134 RasterWorkerPool::GetTaskGraphRunner(), |
132 context_provider_.get(), | 135 context_provider_.get(), |
133 resource_provider_.get(), | 136 resource_provider_.get(), |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 355 |
353 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, | 356 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, |
354 RasterWorkerPoolTest, | 357 RasterWorkerPoolTest, |
355 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, | 358 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, |
356 RASTER_WORKER_POOL_TYPE_IMAGE, | 359 RASTER_WORKER_POOL_TYPE_IMAGE, |
357 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, | 360 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, |
358 RASTER_WORKER_POOL_TYPE_GPU)); | 361 RASTER_WORKER_POOL_TYPE_GPU)); |
359 | 362 |
360 } // namespace | 363 } // namespace |
361 } // namespace cc | 364 } // namespace cc |
OLD | NEW |