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

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

Issue 1336733002: Re-land: cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutex fix 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::Create()), 133 worker_context_provider_(TestContextProvider::CreateWorker()),
134 all_tile_tasks_finished_( 134 all_tile_tasks_finished_(
135 base::ThreadTaskRunnerHandle::Get().get(), 135 base::ThreadTaskRunnerHandle::Get()
136 .get(),
136 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished, 137 base::Bind(&TileTaskWorkerPoolTest::AllTileTasksFinished,
137 base::Unretained(this))), 138 base::Unretained(this))),
138 timeout_seconds_(5), 139 timeout_seconds_(5),
139 timed_out_(false) {} 140 timed_out_(false) {}
140 141
141 // Overridden from testing::Test: 142 // Overridden from testing::Test:
142 void SetUp() override { 143 void SetUp() override {
143 switch (GetParam()) { 144 switch (GetParam()) {
144 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY: 145 case TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY:
145 Create3dOutputSurfaceAndResourceProvider(); 146 Create3dOutputSurfaceAndResourceProvider();
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 407
407 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 408 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
408 TileTaskWorkerPoolTest, 409 TileTaskWorkerPoolTest,
409 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 410 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
410 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 411 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
411 TILE_TASK_WORKER_POOL_TYPE_GPU, 412 TILE_TASK_WORKER_POOL_TYPE_GPU,
412 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 413 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
413 414
414 } // namespace 415 } // namespace
415 } // namespace cc 416 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698