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

Side by Side Diff: cc/raster/synchronous_task_graph_runner.h

Issue 1449133002: TaskGraphRunner refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_RASTER_SYNCHRONOUS_TASK_GRAPH_RUNNER_H_
6 #define CC_RASTER_SYNCHRONOUS_TASK_GRAPH_RUNNER_H_
7
8 #include "cc/raster/task_graph_runner.h"
9 #include "cc/raster/task_graph_work_queue.h"
10
11 namespace cc {
12
13 // Implements a TaskGraphRunner which runs synchronously. This runner only runs
14 // tasks when RunUntilIdle is called.
15 class CC_EXPORT SynchronousTaskGraphRunner : public TaskGraphRunner {
16 public:
17 SynchronousTaskGraphRunner();
18 ~SynchronousTaskGraphRunner() override;
19
20 // Overridden from TaskGraphRunner:
21 void ScheduleTasks(NamespaceToken token, TaskGraph* graph) override;
22 void WaitForTasksToFinishRunning(NamespaceToken token) override;
23 void CollectCompletedTasks(NamespaceToken token,
24 Task::Vector* completed_tasks) override;
25
26 // Runs all pending tasks from all namespaces.
27 void RunUntilIdle();
28
29 private:
30 void RunTask();
31
32 // Stores the actual tasks to be run, sorted by priority.
33 TaskGraphWorkQueue work_queue_;
34 };
35
36 } // namespace cc
37
38 #endif // CC_RASTER_SYNCHRONOUS_TASK_GRAPH_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698