| 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/raster/tile_task_worker_pool.h" | 5 #include "cc/raster/tile_task_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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 unsigned id; | 123 unsigned id; |
| 124 bool canceled; | 124 bool canceled; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 typedef std::vector<scoped_refptr<RasterTask>> RasterTaskVector; | 127 typedef std::vector<scoped_refptr<RasterTask>> RasterTaskVector; |
| 128 | 128 |
| 129 enum NamedTaskSet { REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW, ALL }; | 129 enum NamedTaskSet { REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW, ALL }; |
| 130 | 130 |
| 131 TileTaskWorkerPoolTest() | 131 TileTaskWorkerPoolTest() |
| 132 : context_provider_(TestContextProvider::Create()), | 132 : context_provider_(TestContextProvider::Create()), |
| 133 worker_context_provider_(TestContextProvider::CreateWorker()), | 133 worker_context_provider_(TestContextProvider::Create()), |
| 134 all_tile_tasks_finished_( | 134 all_tile_tasks_finished_( |
| 135 base::ThreadTaskRunnerHandle::Get() | 135 base::ThreadTaskRunnerHandle::Get().get(), |
| 136 .get(), | |
| 137 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished, | 136 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished, |
| 138 base::Unretained(this))), | 137 base::Unretained(this))), |
| 139 timeout_seconds_(5), | 138 timeout_seconds_(5), |
| 140 timed_out_(false) {} | 139 timed_out_(false) {} |
| 141 | 140 |
| 142 // Overridden from testing::Test: | 141 // Overridden from testing::Test: |
| 143 void SetUp() override { | 142 void SetUp() override { |
| 144 switch (GetParam()) { | 143 switch (GetParam()) { |
| 145 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: | 144 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: |
| 146 Create3dOutputSurfaceAndResourceProvider(); | 145 Create3dOutputSurfaceAndResourceProvider(); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 406 |
| 408 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, | 407 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, |
| 409 TileTaskWorkerPoolTest, | 408 TileTaskWorkerPoolTest, |
| 410 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, | 409 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, |
| 411 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, | 410 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, |
| 412 TILE_TASK_WORKER_POOL_TYPE_GPU, | 411 TILE_TASK_WORKER_POOL_TYPE_GPU, |
| 413 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); | 412 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); |
| 414 | 413 |
| 415 } // namespace | 414 } // namespace |
| 416 } // namespace cc | 415 } // namespace cc |
| OLD | NEW |