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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 RasterWorkerPoolTest() | 107 RasterWorkerPoolTest() |
108 : context_provider_(TestContextProvider::Create()), | 108 : context_provider_(TestContextProvider::Create()), |
109 timeout_seconds_(5), | 109 timeout_seconds_(5), |
110 timed_out_(false) { | 110 timed_out_(false) { |
111 output_surface_ = FakeOutputSurface::Create3d(context_provider_).Pass(); | 111 output_surface_ = FakeOutputSurface::Create3d(context_provider_).Pass(); |
112 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 112 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
113 | 113 |
114 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 114 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
115 resource_provider_ = | 115 resource_provider_ = |
116 ResourceProvider::Create( | 116 ResourceProvider::Create( |
117 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1) | 117 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
118 .Pass(); | 118 false).Pass(); |
119 staging_resource_pool_ = ResourcePool::Create( | 119 staging_resource_pool_ = ResourcePool::Create( |
120 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 120 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
121 | 121 |
122 switch (GetParam()) { | 122 switch (GetParam()) { |
123 case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER: | 123 case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER: |
124 raster_worker_pool_ = PixelBufferRasterWorkerPool::Create( | 124 raster_worker_pool_ = PixelBufferRasterWorkerPool::Create( |
125 base::MessageLoopProxy::current().get(), | 125 base::MessageLoopProxy::current().get(), |
126 RasterWorkerPool::GetTaskGraphRunner(), | 126 RasterWorkerPool::GetTaskGraphRunner(), |
127 resource_provider_.get(), | 127 resource_provider_.get(), |
128 std::numeric_limits<size_t>::max()); | 128 std::numeric_limits<size_t>::max()); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 324 |
325 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, | 325 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, |
326 RasterWorkerPoolTest, | 326 RasterWorkerPoolTest, |
327 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, | 327 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, |
328 RASTER_WORKER_POOL_TYPE_IMAGE, | 328 RASTER_WORKER_POOL_TYPE_IMAGE, |
329 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, | 329 RASTER_WORKER_POOL_TYPE_IMAGE_COPY, |
330 RASTER_WORKER_POOL_TYPE_DIRECT)); | 330 RASTER_WORKER_POOL_TYPE_DIRECT)); |
331 | 331 |
332 } // namespace | 332 } // namespace |
333 } // namespace cc | 333 } // namespace cc |
OLD | NEW |