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

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

Issue 1854723002: cc: Simplify task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/one_copy_tile_task_worker_pool.h" 5 #include "cc/raster/one_copy_tile_task_worker_pool.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 task_graph_runner_->ScheduleTasks(namespace_token_, graph); 266 task_graph_runner_->ScheduleTasks(namespace_token_, graph);
267 } 267 }
268 268
269 void OneCopyTileTaskWorkerPool::CheckForCompletedTasks() { 269 void OneCopyTileTaskWorkerPool::CheckForCompletedTasks() {
270 TRACE_EVENT0("cc", "OneCopyTileTaskWorkerPool::CheckForCompletedTasks"); 270 TRACE_EVENT0("cc", "OneCopyTileTaskWorkerPool::CheckForCompletedTasks");
271 271
272 task_graph_runner_->CollectCompletedTasks(namespace_token_, 272 task_graph_runner_->CollectCompletedTasks(namespace_token_,
273 &completed_tasks_); 273 &completed_tasks_);
274 274
275 for (Task::Vector::const_iterator it = completed_tasks_.begin(); 275 for (DependencyTask::Vector::const_iterator it = completed_tasks_.begin();
276 it != completed_tasks_.end(); ++it) { 276 it != completed_tasks_.end(); ++it) {
277 TileTask* task = static_cast<TileTask*>(it->get()); 277 DependencyTask* task = static_cast<DependencyTask*>(it->get());
278 278
279 task->WillComplete(); 279 task->WillComplete();
280 task->CompleteOnOriginThread(this); 280 task->CompleteOnOriginThread(this);
281 task->DidComplete(); 281 task->DidComplete();
282 } 282 }
283 completed_tasks_.clear(); 283 completed_tasks_.clear();
284 } 284 }
285 285
286 ResourceFormat OneCopyTileTaskWorkerPool::GetResourceFormat( 286 ResourceFormat OneCopyTileTaskWorkerPool::GetResourceFormat(
287 bool must_support_alpha) const { 287 bool must_support_alpha) const {
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 return; 736 return;
737 737
738 busy_buffers_.front()->DestroyGLResources(gl); 738 busy_buffers_.front()->DestroyGLResources(gl);
739 RemoveStagingBuffer(busy_buffers_.front().get()); 739 RemoveStagingBuffer(busy_buffers_.front().get());
740 busy_buffers_.pop_front(); 740 busy_buffers_.pop_front();
741 } 741 }
742 } 742 }
743 } 743 }
744 744
745 } // namespace cc 745 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698