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