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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 unsigned id; | 133 unsigned id; |
134 bool canceled; | 134 bool canceled; |
135 }; | 135 }; |
136 | 136 |
137 typedef std::vector<scoped_refptr<RasterTask>> RasterTaskVector; | 137 typedef std::vector<scoped_refptr<RasterTask>> RasterTaskVector; |
138 | 138 |
139 enum NamedTaskSet { REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW, ALL }; | 139 enum NamedTaskSet { REQUIRED_FOR_ACTIVATION, REQUIRED_FOR_DRAW, ALL }; |
140 | 140 |
141 TileTaskWorkerPoolTest() | 141 TileTaskWorkerPoolTest() |
142 : context_provider_(TestContextProvider::Create()), | 142 : context_provider_(TestContextProvider::Create()), |
143 worker_context_provider_(TestContextProvider::Create()), | 143 worker_context_provider_(TestContextProvider::CreateWorker()), |
144 all_tile_tasks_finished_( | 144 all_tile_tasks_finished_( |
145 base::ThreadTaskRunnerHandle::Get().get(), | 145 base::ThreadTaskRunnerHandle::Get() |
danakj
2015/08/26 18:48:50
Did git cl format do this? If so can you please fi
reveman
2015/08/26 22:02:10
crbug.com/525222
| |
146 .get(), | |
146 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished, | 147 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished, |
147 base::Unretained(this))), | 148 base::Unretained(this))), |
148 timeout_seconds_(5), | 149 timeout_seconds_(5), |
149 timed_out_(false) {} | 150 timed_out_(false) {} |
150 | 151 |
151 // Overridden from testing::Test: | 152 // Overridden from testing::Test: |
152 void SetUp() override { | 153 void SetUp() override { |
153 switch (GetParam()) { | 154 switch (GetParam()) { |
154 case TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER: | 155 case TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER: |
155 Create3dOutputSurfaceAndResourceProvider(); | 156 Create3dOutputSurfaceAndResourceProvider(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 TileTaskWorkerPoolTests, | 454 TileTaskWorkerPoolTests, |
454 TileTaskWorkerPoolTest, | 455 TileTaskWorkerPoolTest, |
455 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, | 456 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_PIXEL_BUFFER, |
456 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, | 457 TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, |
457 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, | 458 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, |
458 TILE_TASK_WORKER_POOL_TYPE_GPU, | 459 TILE_TASK_WORKER_POOL_TYPE_GPU, |
459 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); | 460 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); |
460 | 461 |
461 } // namespace | 462 } // namespace |
462 } // namespace cc | 463 } // namespace cc |
OLD | NEW |