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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 264 } |
265 | 265 |
266 private: | 266 private: |
267 void Create3dOutputSurfaceAndResourceProvider() { | 267 void Create3dOutputSurfaceAndResourceProvider() { |
268 output_surface_ = FakeOutputSurface::Create3d(context_provider_).Pass(); | 268 output_surface_ = FakeOutputSurface::Create3d(context_provider_).Pass(); |
269 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 269 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
270 TestWebGraphicsContext3D* context3d = context_provider_->TestContext3d(); | 270 TestWebGraphicsContext3D* context3d = context_provider_->TestContext3d(); |
271 context3d->set_support_sync_query(true); | 271 context3d->set_support_sync_query(true); |
272 resource_provider_ = | 272 resource_provider_ = |
273 ResourceProvider::Create( | 273 ResourceProvider::Create( |
274 output_surface_.get(), NULL, NULL, 0, false, 1, false).Pass(); | 274 output_surface_.get(), nullptr, nullptr, 0, false, 1, false).Pass(); |
275 } | 275 } |
276 | 276 |
277 void CreateSoftwareOutputSurfaceAndResourceProvider() { | 277 void CreateSoftwareOutputSurfaceAndResourceProvider() { |
278 output_surface_ = FakeOutputSurface::CreateSoftware( | 278 output_surface_ = FakeOutputSurface::CreateSoftware( |
279 make_scoped_ptr(new SoftwareOutputDevice)); | 279 make_scoped_ptr(new SoftwareOutputDevice)); |
280 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 280 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
281 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 281 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
282 &shared_bitmap_manager_, | 282 &shared_bitmap_manager_, |
283 NULL, | 283 nullptr, |
284 0, | 284 0, |
285 false, | 285 false, |
286 1, | 286 1, |
287 false).Pass(); | 287 false).Pass(); |
288 } | 288 } |
289 | 289 |
290 void OnTaskCompleted(scoped_ptr<ScopedResource> resource, | 290 void OnTaskCompleted(scoped_ptr<ScopedResource> resource, |
291 unsigned id, | 291 unsigned id, |
292 const PicturePileImpl::Analysis& analysis, | 292 const PicturePileImpl::Analysis& analysis, |
293 bool was_canceled) { | 293 bool was_canceled) { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, | 393 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, |
394 RasterWorkerPoolTest, | 394 RasterWorkerPoolTest, |
395 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, | 395 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, |
396 RASTER_WORKER_POOL_TYPE_ZERO_COPY, | 396 RASTER_WORKER_POOL_TYPE_ZERO_COPY, |
397 RASTER_WORKER_POOL_TYPE_ONE_COPY, | 397 RASTER_WORKER_POOL_TYPE_ONE_COPY, |
398 RASTER_WORKER_POOL_TYPE_GPU, | 398 RASTER_WORKER_POOL_TYPE_GPU, |
399 RASTER_WORKER_POOL_TYPE_BITMAP)); | 399 RASTER_WORKER_POOL_TYPE_BITMAP)); |
400 | 400 |
401 } // namespace | 401 } // namespace |
402 } // namespace cc | 402 } // namespace cc |
OLD | NEW |