Index: cc/scheduler/scheduler.h |
diff --git a/cc/scheduler/scheduler.h b/cc/scheduler/scheduler.h |
index faf4399fdca63b940aa59b4f123d339c7b9dcab0..00e1b98618aaad9c7013d4585b309f6d50fda30b 100644 |
--- a/cc/scheduler/scheduler.h |
+++ b/cc/scheduler/scheduler.h |
@@ -48,7 +48,6 @@ class SchedulerClient { |
virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() = 0; |
virtual base::TimeDelta CommitToActivateDurationEstimate() = 0; |
virtual void DidBeginImplFrameDeadline() = 0; |
- virtual void SendBeginFramesToChildren(const BeginFrameArgs& args) = 0; |
protected: |
virtual ~SchedulerClient() {} |
@@ -75,7 +74,8 @@ class CC_EXPORT SchedulerFrameSourcesConstructor { |
}; |
class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
- public base::PowerObserver { |
+ public base::PowerObserver, |
+ public ProxyBeginFrameSource::Delegate { |
public: |
static scoped_ptr<Scheduler> Create( |
SchedulerClient* client, |
@@ -83,7 +83,8 @@ class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
int layer_tree_host_id, |
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
base::PowerMonitor* power_monitor, |
- scoped_ptr<BeginFrameSource> external_begin_frame_source) { |
+ scoped_ptr<BeginFrameSource> external_begin_frame_source, |
+ ProxyBeginFrameSource* proxy_begin_frame_source) { |
SchedulerFrameSourcesConstructor frame_sources_constructor; |
return make_scoped_ptr(new Scheduler(client, |
scheduler_settings, |
@@ -91,6 +92,7 @@ class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
task_runner, |
power_monitor, |
external_begin_frame_source.Pass(), |
+ proxy_begin_frame_source, |
&frame_sources_constructor)); |
} |
@@ -102,6 +104,9 @@ class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
// base::PowerObserver method. |
void OnPowerStateChange(bool on_battery_power) override; |
+ // ProxyBeginFrameSource::Delegate. |
+ void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; |
+ |
const SchedulerSettings& settings() const { return settings_; } |
void CommitVSyncParameters(base::TimeTicks timebase, |
@@ -169,8 +174,6 @@ class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
state_machine_.SetContinuousPainting(continuous_painting); |
} |
- void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
- |
protected: |
Scheduler(SchedulerClient* client, |
const SchedulerSettings& scheduler_settings, |
@@ -178,6 +181,7 @@ class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
base::PowerMonitor* power_monitor, |
scoped_ptr<BeginFrameSource> external_begin_frame_source, |
+ ProxyBeginFrameSource* proxy_begin_frame_source, |
SchedulerFrameSourcesConstructor* frame_sources_constructor); |
// virtual for testing - Don't call these in the constructor or |
@@ -223,6 +227,7 @@ class CC_EXPORT Scheduler : public BeginFrameObserverMixIn, |
SchedulerStateMachine state_machine_; |
bool inside_process_scheduled_actions_; |
SchedulerStateMachine::Action inside_action_; |
+ ProxyBeginFrameSource* proxy_begin_frame_source_; |
private: |
void ScheduleBeginImplFrameDeadline(); |