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

Unified Diff: cc/scheduler/scheduler.cc

Issue 23495022: CC: Add a scheduled action for ManageTiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use frame count instead of begin-frame throttling Created 7 years, 3 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 ebdc289b18e50082e00ff9cac20698d227e00f0b..c307bc88f0c3a98a2036e5c07608e9e91fa7ad22 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -19,7 +19,8 @@ Scheduler::Scheduler(SchedulerClient* client,
last_set_needs_begin_frame_(false),
has_pending_begin_frame_(false),
state_machine_(scheduler_settings),
- inside_process_scheduled_actions_(false) {
+ inside_process_scheduled_actions_(false),
+ inside_action_(SchedulerStateMachine::ACTION_NONE) {
DCHECK(client_);
DCHECK(!state_machine_.BeginFrameNeededToDrawByImplThread());
}
@@ -64,6 +65,12 @@ void Scheduler::SetNeedsRedraw() {
ProcessScheduledActions();
}
+void Scheduler::SetNeedsManageTiles() {
+ DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_MANAGE_TILES));
brianderson 2013/09/13 00:29:00 How does ManagingTiles result in SetNeedsManageTil
epennerAtGoogle 2013/09/13 00:37:56 We don't do it. This is just meant to insure we ne
brianderson 2013/09/13 00:42:34 Ah, I completely miss read the code. I really lik
+ state_machine_.SetNeedsManageTiles();
+ ProcessScheduledActions();
+}
+
void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) {
state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile);
ProcessScheduledActions();
@@ -223,6 +230,8 @@ void Scheduler::ProcessScheduledActions() {
"state",
TracedValue::FromValue(state_machine_.AsValue().release()));
state_machine_.UpdateState(action);
+ base::AutoReset<SchedulerStateMachine::Action>
+ mark_inside_action(&inside_action_, action);
enne (OOO) 2013/09/13 00:47:01 Nifty!
switch (action) {
case SchedulerStateMachine::ACTION_NONE:
break;
@@ -257,6 +266,9 @@ void Scheduler::ProcessScheduledActions() {
case SchedulerStateMachine::ACTION_ACQUIRE_LAYER_TEXTURES_FOR_MAIN_THREAD:
client_->ScheduledActionAcquireLayerTexturesForMainThread();
break;
+ case SchedulerStateMachine::ACTION_MANAGE_TILES:
+ client_->ScheduledActionManageTiles();
+ break;
}
} while (action != SchedulerStateMachine::ACTION_NONE);

Powered by Google App Engine
This is Rietveld 408576698