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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1012853003: Add DisplayScheduler for Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change Browser references to root surfce Created 5 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
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/surfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 2fbeca2d8a992d87cd118a09a78eeb5db8b61d3b..6469a362755e835a73d2f199c522fabff08ba242 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -818,6 +818,10 @@ bool SchedulerStateMachine::ProactiveBeginFrameWanted() const {
return false;
}
+void SchedulerStateMachine::DidSkipBeginImplFrameToReduceLatency() {
+ last_swap_ack_came_after_begin_impl_frame_ = false;
+}
+
void SchedulerStateMachine::OnBeginImplFrame() {
begin_impl_frame_state_ = BEGIN_IMPL_FRAME_STATE_BEGIN_FRAME_STARTING;
current_frame_number_++;
@@ -882,7 +886,6 @@ SchedulerStateMachine::CurrentBeginImplFrameDeadlineMode() const {
bool SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately()
const {
- // TODO(brianderson): This should take into account multiple commit sources.
if (begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_INSIDE_BEGIN_FRAME)
return false;
@@ -993,6 +996,8 @@ void SchedulerStateMachine::DidSwapBuffers() {
void SchedulerStateMachine::DidSwapBuffersComplete() {
DCHECK_GT(pending_swaps_, 0);
pending_swaps_--;
+ last_swap_ack_came_after_begin_impl_frame_ =
+ begin_impl_frame_state_ != BEGIN_IMPL_FRAME_STATE_IDLE;
}
void SchedulerStateMachine::SetImplLatencyTakesPriority(
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/surfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698