| Index: cc/scheduler/begin_frame_source.h
|
| diff --git a/cc/scheduler/begin_frame_source.h b/cc/scheduler/begin_frame_source.h
|
| index 3b8a576c4ed9fa8363aeea15a2bdef772355234e..8086bed64bf787fb9387c6c7ed61c20ff26a59f3 100644
|
| --- a/cc/scheduler/begin_frame_source.h
|
| +++ b/cc/scheduler/begin_frame_source.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/debug/trace_event.h"
|
| #include "base/logging.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "cc/output/begin_frame_args.h"
|
| #include "cc/output/vsync_parameter_observer.h"
|
| #include "cc/scheduler/delay_based_time_source.h"
|
| @@ -162,6 +163,27 @@ class CC_EXPORT BeginFrameSourceMixIn : public BeginFrameSource {
|
| bool inside_as_value_into_;
|
| };
|
|
|
| +// A frame source that delivers BeginFrame from outside of cc.
|
| +// ExternalBeginFrameSource is ref-counted object because it could be used by
|
| +// outside of cc to deliver new BeginFrame.
|
| +class CC_EXPORT ExternalBeginFrameSource
|
| + : public BeginFrameSourceMixIn,
|
| + public base::RefCounted<ExternalBeginFrameSource>,
|
| + public NON_EXPORTED_BASE(base::NonThreadSafe) {
|
| + public:
|
| + ExternalBeginFrameSource() {}
|
| +
|
| + // Tells the Source that client is ready to handle external BeginFrames.
|
| + virtual void SetClientReady() {}
|
| +
|
| + protected:
|
| + friend class base::RefCounted<ExternalBeginFrameSource>;
|
| + virtual ~ExternalBeginFrameSource() {}
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource);
|
| +};
|
| +
|
| // A frame source which calls BeginFrame (at the next possible time) as soon as
|
| // remaining frames reaches zero.
|
| class CC_EXPORT BackToBackBeginFrameSource : public BeginFrameSourceMixIn {
|
|
|