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

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

Issue 1538433002: Revert of TaskGraphRunner Group support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: Created 5 years 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
« no previous file with comments | « cc/raster/tile_task_worker_pool_perftest.cc ('k') | cc/test/task_graph_runner_test_template.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 tile_task_worker_pool_->AsTileTaskRunner()->CheckForCompletedTasks(); 187 tile_task_worker_pool_->AsTileTaskRunner()->CheckForCompletedTasks();
188 } 188 }
189 189
190 void ScheduleTasks() { 190 void ScheduleTasks() {
191 graph_.Reset(); 191 graph_.Reset();
192 192
193 size_t priority = 0; 193 size_t priority = 0;
194 194
195 for (RasterTaskVector::const_iterator it = tasks_.begin(); 195 for (RasterTaskVector::const_iterator it = tasks_.begin();
196 it != tasks_.end(); ++it) { 196 it != tasks_.end(); ++it) {
197 graph_.nodes.emplace_back(it->get(), 0 /* group */, priority++, 197 graph_.nodes.emplace_back(it->get(), priority++, 0 /* dependencies */);
198 0 /* dependencies */);
199 } 198 }
200 199
201 tile_task_worker_pool_->AsTileTaskRunner()->ScheduleTasks(&graph_); 200 tile_task_worker_pool_->AsTileTaskRunner()->ScheduleTasks(&graph_);
202 } 201 }
203 202
204 void AppendTask(unsigned id, const gfx::Size& size) { 203 void AppendTask(unsigned id, const gfx::Size& size) {
205 scoped_ptr<ScopedResource> resource( 204 scoped_ptr<ScopedResource> resource(
206 ScopedResource::Create(resource_provider_.get())); 205 ScopedResource::Create(resource_provider_.get()));
207 resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE, 206 resource->Allocate(size, ResourceProvider::TEXTURE_HINT_IMMUTABLE,
208 RGBA_8888); 207 RGBA_8888);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 368
370 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests, 369 INSTANTIATE_TEST_CASE_P(TileTaskWorkerPoolTests,
371 TileTaskWorkerPoolTest, 370 TileTaskWorkerPoolTest,
372 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY, 371 ::testing::Values(TILE_TASK_WORKER_POOL_TYPE_ZERO_COPY,
373 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY, 372 TILE_TASK_WORKER_POOL_TYPE_ONE_COPY,
374 TILE_TASK_WORKER_POOL_TYPE_GPU, 373 TILE_TASK_WORKER_POOL_TYPE_GPU,
375 TILE_TASK_WORKER_POOL_TYPE_BITMAP)); 374 TILE_TASK_WORKER_POOL_TYPE_BITMAP));
376 375
377 } // namespace 376 } // namespace
378 } // namespace cc 377 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_worker_pool_perftest.cc ('k') | cc/test/task_graph_runner_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698