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

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

Issue 1666283002: Reland - Refactor signaling in RWP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix refcounting issue. Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 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 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/synchronous_task_graph_runner.h" 5 #include "cc/raster/synchronous_task_graph_runner.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 [](const std::pair<uint16_t, TaskGraphWorkQueue::TaskNamespace::Vector>& 77 [](const std::pair<uint16_t, TaskGraphWorkQueue::TaskNamespace::Vector>&
78 pair) { return !pair.second.empty(); }); 78 pair) { return !pair.second.empty(); });
79 79
80 if (found == ready_to_run_namespaces.cend()) { 80 if (found == ready_to_run_namespaces.cend()) {
81 return false; 81 return false;
82 } 82 }
83 83
84 const uint16_t category = found->first; 84 const uint16_t category = found->first;
85 auto prioritized_task = work_queue_.GetNextTaskToRun(category); 85 auto prioritized_task = work_queue_.GetNextTaskToRun(category);
86 86
87 Task* task = prioritized_task.task; 87 Task* task = prioritized_task.task.get();
88 task->WillRun(); 88 task->WillRun();
89 task->RunOnWorkerThread(); 89 task->RunOnWorkerThread();
90 task->DidRun(); 90 task->DidRun();
91 91
92 work_queue_.CompleteTask(prioritized_task); 92 work_queue_.CompleteTask(prioritized_task);
93 93
94 return true; 94 return true;
95 } 95 }
96 96
97 } // namespace cc 97 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698