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

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 1435133004: cc: Clean up max frames/swaps pending usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 state_machine_.SetNeedsAnimate(); 186 state_machine_.SetNeedsAnimate();
187 ProcessScheduledActions(); 187 ProcessScheduledActions();
188 } 188 }
189 189
190 void Scheduler::SetNeedsPrepareTiles() { 190 void Scheduler::SetNeedsPrepareTiles() {
191 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_PREPARE_TILES)); 191 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_PREPARE_TILES));
192 state_machine_.SetNeedsPrepareTiles(); 192 state_machine_.SetNeedsPrepareTiles();
193 ProcessScheduledActions(); 193 ProcessScheduledActions();
194 } 194 }
195 195
196 void Scheduler::SetMaxSwapsPending(int max) {
197 state_machine_.SetMaxSwapsPending(max);
198 }
199
200 void Scheduler::DidSwapBuffers() { 196 void Scheduler::DidSwapBuffers() {
201 state_machine_.DidSwapBuffers(); 197 state_machine_.DidSwapBuffers();
202 198
203 // There is no need to call ProcessScheduledActions here because 199 // There is no need to call ProcessScheduledActions here because
204 // swapping should not trigger any new actions. 200 // swapping should not trigger any new actions.
205 if (!inside_process_scheduled_actions_) { 201 if (!inside_process_scheduled_actions_) {
206 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE); 202 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE);
207 } 203 }
208 } 204 }
209 205
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 843 }
848 844
849 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 845 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
850 return (state_machine_.begin_main_frame_state() == 846 return (state_machine_.begin_main_frame_state() ==
851 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT || 847 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_SENT ||
852 state_machine_.begin_main_frame_state() == 848 state_machine_.begin_main_frame_state() ==
853 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED); 849 SchedulerStateMachine::BEGIN_MAIN_FRAME_STATE_STARTED);
854 } 850 }
855 851
856 } // namespace cc 852 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698