Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1111)

Side by Side Diff: cc/raster/tile_task_worker_pool_unittest.cc

Issue 1317743002: cc: Implement shared worker contexts. (v1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing context3d_task_runner_ check Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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::Create()), 136 worker_context_provider_(TestContextProvider::CreateWorker()),
137 all_tile_tasks_finished_( 137 all_tile_tasks_finished_(
138 base::ThreadTaskRunnerHandle::Get().get(), 138 base::ThreadTaskRunnerHandle::Get()
139 .get(),
139 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished, 140 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished,
140 base::Unretained(this))), 141 base::Unretained(this))),
141 timeout_seconds_(5), 142 timeout_seconds_(5),
142 timed_out_(false) {} 143 timed_out_(false) {}
143 144
144 // Overridden from testing::Test: 145 // Overridden from testing::Test:
145 void SetUp() override { 146 void SetUp() override {
146 switch (GetParam()) { 147 switch (GetParam()) {
147 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: 148 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY:
148 Create3dOutputSurfaceAndResourceProvider(); 149 Create3dOutputSurfaceAndResourceProvider();
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 410
410 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 411 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
411 TileTaskWorkerPoolTest, 412 TileTaskWorkerPoolTest,
412 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 413 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
413 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 414 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
414 TILE_TASK_WORKER_POOL_TYPE_GPU, 415 TILE_TASK_WORKER_POOL_TYPE_GPU,
415 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 416 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
416 417
417 } // namespace 418 } // namespace
418 } // namespace cc 419 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698