| Index: cc/scheduler/scheduler_state_machine.cc
|
| diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
|
| index 72e68ea3e74505df242a61f009c5ed97fcd70edb..1a444c9a158168283165a077085333c7b510b15e 100644
|
| --- a/cc/scheduler/scheduler_state_machine.cc
|
| +++ b/cc/scheduler/scheduler_state_machine.cc
|
| @@ -52,6 +52,7 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
|
| continuous_painting_(false),
|
| children_need_begin_frames_(false),
|
| defer_commits_(false),
|
| + video_needs_begin_frames_(false),
|
| last_commit_had_no_updates_(false),
|
| wait_for_active_tree_ready_to_draw_(false),
|
| did_request_swap_in_last_frame_(false),
|
| @@ -243,6 +244,7 @@ void SchedulerStateMachine::AsValueInto(
|
| skip_next_begin_main_frame_to_reduce_latency_);
|
| state->SetBoolean("continuous_painting", continuous_painting_);
|
| state->SetBoolean("children_need_begin_frames", children_need_begin_frames_);
|
| + state->SetBoolean("video_needs_begin_frames", video_needs_begin_frames_);
|
| state->SetBoolean("defer_commits", defer_commits_);
|
| state->SetBoolean("last_commit_had_no_updates", last_commit_had_no_updates_);
|
| state->SetBoolean("did_request_swap_in_last_frame",
|
| @@ -723,6 +725,9 @@ void SchedulerStateMachine::SetSkipNextBeginMainFrameToReduceLatency() {
|
| bool SchedulerStateMachine::BeginFrameRequiredForChildren() const {
|
| return children_need_begin_frames_;
|
| }
|
| +bool SchedulerStateMachine::BeginFrameNeededForVideo() const {
|
| + return video_needs_begin_frames_;
|
| +}
|
|
|
| bool SchedulerStateMachine::BeginFrameNeeded() const {
|
| // We can't handle BeginFrames when output surface isn't initialized.
|
| @@ -735,7 +740,7 @@ bool SchedulerStateMachine::BeginFrameNeeded() const {
|
| return false;
|
|
|
| return (BeginFrameRequiredForAction() || BeginFrameRequiredForChildren() ||
|
| - ProactiveBeginFrameWanted());
|
| + BeginFrameNeededForVideo() || ProactiveBeginFrameWanted());
|
| }
|
|
|
| void SchedulerStateMachine::SetChildrenNeedBeginFrames(
|
| @@ -743,6 +748,11 @@ void SchedulerStateMachine::SetChildrenNeedBeginFrames(
|
| children_need_begin_frames_ = children_need_begin_frames;
|
| }
|
|
|
| +void SchedulerStateMachine::SetVideoNeedsBeginFrames(
|
| + bool video_needs_begin_frames) {
|
| + video_needs_begin_frames_ = video_needs_begin_frames;
|
| +}
|
| +
|
| void SchedulerStateMachine::SetDeferCommits(bool defer_commits) {
|
| defer_commits_ = defer_commits;
|
| }
|
|
|