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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1218663007: cc: Allow SendBeginMainFrame in idle state for synchronous compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | 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 9dd65511669916003de3cc8cab5acbb66bc2682b..4faa9116118bcee718e986fab8cc0a2620f2cde8 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -26,11 +26,11 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
last_frame_number_swap_requested_(-1),
last_frame_number_begin_main_frame_sent_(-1),
last_frame_number_invalidate_output_surface_performed_(-1),
- animate_funnel_(false),
- request_swap_funnel_(false),
- send_begin_main_frame_funnel_(false),
- invalidate_output_surface_funnel_(false),
- prepare_tiles_funnel_(0),
+ animate_funnel_(true),
+ request_swap_funnel_(true),
+ send_begin_main_frame_funnel_(true),
+ invalidate_output_surface_funnel_(true),
+ prepare_tiles_funnel_(1),
mithro-old 2015/07/08 03:26:33 Why do these values change?
sunnyps 2015/07/13 23:56:11 Only the value for send_begin_main_frame_funnel_ n
consecutive_checkerboard_animations_(0),
max_pending_swaps_(1),
pending_swaps_(0),
@@ -421,7 +421,8 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {
if (!CouldSendBeginMainFrame())
return false;
- // Do not send begin main frame too many times in a single frame.
+ // Do not send begin main frame too many times in a single frame or before
+ // the first BeginFrame.
if (send_begin_main_frame_funnel_)
return false;
@@ -439,14 +440,16 @@ bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {
return false;
}
- // We should not send BeginMainFrame while we are in
- // BEGIN_IMPL_FRAME_STATE_IDLE since we might have new
- // user input arriving soon.
+ // We should not send BeginMainFrame while we are in the idle state since we
+ // might have new user input arriving soon. It's okay to send BeginMainFrame
+ // for the synchronous compositor because the main thread is always high
+ // latency in that case.
// TODO(brianderson): Allow sending BeginMainFrame while idle when the main
- // thread isn't consuming user input.
- if (begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_IDLE &&
- BeginFrameNeeded())
+ // thread isn't consuming user input for non-synchronous compositor.
+ if (!settings_.using_synchronous_renderer_compositor &&
+ begin_impl_frame_state_ == BEGIN_IMPL_FRAME_STATE_IDLE) {
return false;
+ }
// We need a new commit for the forced redraw. This honors the
// single commit per interval because the result will be swapped to screen.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698