Index: cc/scheduler/scheduler_state_machine.cc |
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc |
index 723c40c80c276d42ce3d1e2df2c58f51dfad5742..33ae41b3bd4405c077ba43abd317b96c2b33e1f2 100644 |
--- a/cc/scheduler/scheduler_state_machine.cc |
+++ b/cc/scheduler/scheduler_state_machine.cc |
@@ -47,7 +47,8 @@ SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings) |
smoothness_takes_priority_(false), |
skip_next_begin_main_frame_to_reduce_latency_(false), |
skip_begin_main_frame_to_reduce_latency_(false), |
- continuous_painting_(false) { |
+ continuous_painting_(false), |
+ children_need_begin_frames_(false) { |
} |
const char* SchedulerStateMachine::OutputSurfaceStateToString( |
@@ -733,6 +734,12 @@ bool SchedulerStateMachine::SupportsProactiveBeginFrame() const { |
return !settings_.using_synchronous_renderer_compositor; |
} |
+void SchedulerStateMachine::SetChildrenNeedBeginFrames( |
+ bool children_need_begin_frames) { |
+ DCHECK(settings_.begin_frame_publisher); |
+ children_need_begin_frames_ = children_need_begin_frames; |
+} |
+ |
// These are the cases where we definitely (or almost definitely) have a |
// new frame to animate and/or draw and can draw. |
bool SchedulerStateMachine::BeginFrameNeededToAnimateOrDraw() const { |
@@ -745,6 +752,9 @@ bool SchedulerStateMachine::BeginFrameNeededToAnimateOrDraw() const { |
if (!can_draw_) |
return false; |
+ if (children_need_begin_frames_) |
+ return true; |
+ |
// The forced draw respects our normal draw scheduling, so we need to |
// request a BeginImplFrame for it. |
if (forced_redraw_state_ == FORCED_REDRAW_STATE_WAITING_FOR_DRAW) |