| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 : public testing::TestWithParam<RasterWorkerPoolType>, | 115 : public testing::TestWithParam<RasterWorkerPoolType>, |
| 116 public RasterizerClient { | 116 public RasterizerClient { |
| 117 public: | 117 public: |
| 118 struct RasterTaskResult { | 118 struct RasterTaskResult { |
| 119 unsigned id; | 119 unsigned id; |
| 120 bool canceled; | 120 bool canceled; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 typedef std::vector<scoped_refptr<RasterTask>> RasterTaskVector; | 123 typedef std::vector<scoped_refptr<RasterTask>> RasterTaskVector; |
| 124 | 124 |
| 125 enum NamedTaskSet { REQUIRED_FOR_ACTIVATION = 0, ALL = 1 }; | 125 enum NamedTaskSet { |
| 126 REQUIRED_FOR_DRAW = 0, |
| 127 REQUIRED_FOR_ACTIVATION = 1, |
| 128 ALL = 2 |
| 129 }; |
| 126 | 130 |
| 127 RasterWorkerPoolTest() | 131 RasterWorkerPoolTest() |
| 128 : context_provider_(TestContextProvider::Create()), | 132 : context_provider_(TestContextProvider::Create()), |
| 129 timeout_seconds_(5), | 133 timeout_seconds_(5), |
| 130 timed_out_(false) {} | 134 timed_out_(false) {} |
| 131 | 135 |
| 132 // Overridden from testing::Test: | 136 // Overridden from testing::Test: |
| 133 virtual void SetUp() override { | 137 virtual void SetUp() override { |
| 134 switch (GetParam()) { | 138 switch (GetParam()) { |
| 135 case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER: | 139 case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER: |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, | 407 INSTANTIATE_TEST_CASE_P(RasterWorkerPoolTests, |
| 404 RasterWorkerPoolTest, | 408 RasterWorkerPoolTest, |
| 405 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, | 409 ::testing::Values(RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER, |
| 406 RASTER_WORKER_POOL_TYPE_ZERO_COPY, | 410 RASTER_WORKER_POOL_TYPE_ZERO_COPY, |
| 407 RASTER_WORKER_POOL_TYPE_ONE_COPY, | 411 RASTER_WORKER_POOL_TYPE_ONE_COPY, |
| 408 RASTER_WORKER_POOL_TYPE_GPU, | 412 RASTER_WORKER_POOL_TYPE_GPU, |
| 409 RASTER_WORKER_POOL_TYPE_BITMAP)); | 413 RASTER_WORKER_POOL_TYPE_BITMAP)); |
| 410 | 414 |
| 411 } // namespace | 415 } // namespace |
| 412 } // namespace cc | 416 } // namespace cc |
| OLD | NEW |