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

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

Issue 672283003: cc: ReadyToDraw notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More clean-ups. Created 6 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
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 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void Scheduler::SetCanDraw(bool can_draw) { 190 void Scheduler::SetCanDraw(bool can_draw) {
191 state_machine_.SetCanDraw(can_draw); 191 state_machine_.SetCanDraw(can_draw);
192 ProcessScheduledActions(); 192 ProcessScheduledActions();
193 } 193 }
194 194
195 void Scheduler::NotifyReadyToActivate() { 195 void Scheduler::NotifyReadyToActivate() {
196 state_machine_.NotifyReadyToActivate(); 196 state_machine_.NotifyReadyToActivate();
197 ProcessScheduledActions(); 197 ProcessScheduledActions();
198 } 198 }
199 199
200 void Scheduler::NotifyReadyToDraw() {
201 // Empty for now, until we take action based on the notification as part of
202 // crbugs 352894, 383157, 421923.
203 }
204
200 void Scheduler::SetNeedsCommit() { 205 void Scheduler::SetNeedsCommit() {
201 state_machine_.SetNeedsCommit(); 206 state_machine_.SetNeedsCommit();
202 ProcessScheduledActions(); 207 ProcessScheduledActions();
203 } 208 }
204 209
205 void Scheduler::SetNeedsRedraw() { 210 void Scheduler::SetNeedsRedraw() {
206 state_machine_.SetNeedsRedraw(); 211 state_machine_.SetNeedsRedraw();
207 ProcessScheduledActions(); 212 ProcessScheduledActions();
208 } 213 }
209 214
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 } 777 }
773 778
774 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 779 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
775 return (state_machine_.commit_state() == 780 return (state_machine_.commit_state() ==
776 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 781 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
777 state_machine_.commit_state() == 782 state_machine_.commit_state() ==
778 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 783 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
779 } 784 }
780 785
781 } // namespace cc 786 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698