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

Unified Diff: cc/scheduler/scheduler.cc

Issue 199523002: cc: Throttle swaps in Scheduler instead of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: dana's comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 5d7001065f01dcdf1dbe0f1f9884e0544bfe8a22..7883d92050fd33d0ec869a7390ff1f853fc5a597 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -92,11 +92,26 @@ void Scheduler::SetNeedsManageTiles() {
ProcessScheduledActions();
}
+void Scheduler::SetMaxSwapsPending(int max) {
+ state_machine_.SetMaxSwapsPending(max);
+}
+
+void Scheduler::DidSwapBuffers() {
+ state_machine_.DidSwapBuffers();
+ // There is no need to call ProcessScheduledActions here because
+ // swapping should not trigger any new actions.
danakj 2014/04/14 18:14:51 Can we DCHECK that state_machine_.NextAction() is
brianderson 2014/04/16 22:41:53 We are most likely already in a ProcessScheduledAc
+}
+
void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) {
state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile);
ProcessScheduledActions();
}
+void Scheduler::DidSwapBuffersComplete() {
+ state_machine_.DidSwapBuffersComplete();
+ ProcessScheduledActions();
+}
+
void Scheduler::SetSmoothnessTakesPriority(bool smoothness_takes_priority) {
state_machine_.SetSmoothnessTakesPriority(smoothness_takes_priority);
ProcessScheduledActions();
@@ -433,7 +448,7 @@ void Scheduler::DrawAndSwapForced() {
void Scheduler::DrawAndReadback() {
DrawSwapReadbackResult result = client_->ScheduledActionDrawAndReadback();
- DCHECK(!result.did_swap);
+ DCHECK(!result.did_request_swap);
}
void Scheduler::ProcessScheduledActions() {

Powered by Google App Engine
This is Rietveld 408576698