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

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

Issue 1247033007: cc: Abort frame when becoming invisible and waiting for ready to draw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove race from test Created 5 years, 5 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
« 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 state_machine_.SetNeedsAnimate(); 176 state_machine_.SetNeedsAnimate();
177 ProcessScheduledActions(); 177 ProcessScheduledActions();
178 } 178 }
179 179
180 void Scheduler::SetNeedsPrepareTiles() { 180 void Scheduler::SetNeedsPrepareTiles() {
181 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_PREPARE_TILES)); 181 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_PREPARE_TILES));
182 state_machine_.SetNeedsPrepareTiles(); 182 state_machine_.SetNeedsPrepareTiles();
183 ProcessScheduledActions(); 183 ProcessScheduledActions();
184 } 184 }
185 185
186 void Scheduler::SetWaitForReadyToDraw() {
187 state_machine_.SetWaitForReadyToDraw();
188 ProcessScheduledActions();
189 }
190
191 void Scheduler::SetMaxSwapsPending(int max) { 186 void Scheduler::SetMaxSwapsPending(int max) {
192 state_machine_.SetMaxSwapsPending(max); 187 state_machine_.SetMaxSwapsPending(max);
193 } 188 }
194 189
195 void Scheduler::DidSwapBuffers() { 190 void Scheduler::DidSwapBuffers() {
196 state_machine_.DidSwapBuffers(); 191 state_machine_.DidSwapBuffers();
197 192
198 // There is no need to call ProcessScheduledActions here because 193 // There is no need to call ProcessScheduledActions here because
199 // swapping should not trigger any new actions. 194 // swapping should not trigger any new actions.
200 if (!inside_process_scheduled_actions_) { 195 if (!inside_process_scheduled_actions_) {
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 } 809 }
815 810
816 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 811 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
817 return (state_machine_.commit_state() == 812 return (state_machine_.commit_state() ==
818 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 813 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
819 state_machine_.commit_state() == 814 state_machine_.commit_state() ==
820 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 815 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
821 } 816 }
822 817
823 } // namespace cc 818 } // 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