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

Unified Diff: cc/raster/task_graph_runner.cc

Issue 1739993004: content: Implement dynamic priorities for raster threads. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: preparing for checkin. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/raster/task_graph_runner.h ('k') | cc/raster/task_graph_work_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/task_graph_runner.cc
diff --git a/cc/raster/task_graph_runner.cc b/cc/raster/task_graph_runner.cc
index 4f1af43ad43901309131886aa2dd6d5c6de1343a..f3d657d279e928b00d3283c6be760f9a7ddf2698 100644
--- a/cc/raster/task_graph_runner.cc
+++ b/cc/raster/task_graph_runner.cc
@@ -5,6 +5,7 @@
#include "cc/raster/task_graph_runner.h"
#include <algorithm>
+#include <iomanip>
prashant.n 2016/03/11 17:49:35 Remove.
#include <utility>
#include "base/atomic_sequence_num.h"
@@ -13,12 +14,23 @@
namespace cc {
-Task::Task() : will_run_(false), did_run_(false) {}
+Task::Task() : worker_(nullptr), will_run_(false), did_run_(false) {}
Task::~Task() {
DCHECK(!will_run_);
}
+void Task::AttachWorker(TaskWorker* worker) {
prashant.n 2016/03/11 17:49:35 AttachTaskWorker/DetachTaskWorker
+ DCHECK(!will_run_);
+ DCHECK(!did_run_);
+ worker_ = worker;
+}
+void Task::DetachWorker() {
+ DCHECK(did_run_);
+ worker_->TaskDone();
+ worker_ = nullptr;
+}
+
void Task::WillRun() {
DCHECK(!will_run_);
DCHECK(!did_run_);
« no previous file with comments | « cc/raster/task_graph_runner.h ('k') | cc/raster/task_graph_work_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698