| Index: ui/compositor/compositor.h
|
| diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
| index a10b62fcedfafd99b2c31256eafb6dfab46586ee..93a8a6043f42b2e63ce1af6421b67db4021ec451 100644
|
| --- a/ui/compositor/compositor.h
|
| +++ b/ui/compositor/compositor.h
|
| @@ -16,6 +16,7 @@
|
| #include "cc/trees/layer_tree_host_client.h"
|
| #include "cc/trees/layer_tree_host_single_thread_client.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| +#include "ui/compositor/animation_frame_task.h"
|
| #include "ui/compositor/compositor_export.h"
|
| #include "ui/compositor/compositor_observer.h"
|
| #include "ui/compositor/layer_animator_collection.h"
|
| @@ -129,7 +130,7 @@ class COMPOSITOR_EXPORT CompositorLock
|
| class COMPOSITOR_EXPORT Compositor
|
| : NON_EXPORTED_BASE(public cc::LayerTreeHostClient),
|
| NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient),
|
| - NON_EXPORTED_BASE(public LayerAnimatorCollectionDelegate) {
|
| + NON_EXPORTED_BASE(public AnimationFrameTaskProvider) {
|
| public:
|
| Compositor(gfx::AcceleratedWidget widget,
|
| ui::ContextFactory* context_factory,
|
| @@ -235,8 +236,9 @@ class COMPOSITOR_EXPORT Compositor
|
| virtual void DidPostSwapBuffers() OVERRIDE;
|
| virtual void DidAbortSwapBuffers() OVERRIDE;
|
|
|
| - // LayerAnimatorCollectionDelegate implementation.
|
| - virtual void ScheduleAnimationForLayerCollection() OVERRIDE;
|
| + // AnimationFrameTaskProvider:
|
| + virtual scoped_ptr<ScopedAnimationFrameTask> RequestAnimationFrameTask(
|
| + AnimationFrameTask* task) OVERRIDE;
|
|
|
| int last_started_frame() { return last_started_frame_; }
|
| int last_ended_frame() { return last_ended_frame_; }
|
| @@ -254,6 +256,10 @@ class COMPOSITOR_EXPORT Compositor
|
| friend class base::RefCounted<Compositor>;
|
| friend class CompositorLock;
|
|
|
| + void RemoveAnimationFrameTask(AnimationFrameTask* task);
|
| +
|
| + std::set<AnimationFrameTask*> rafs_;
|
| +
|
| // Called by CompositorLock.
|
| void UnlockCompositor();
|
|
|
| @@ -303,7 +309,7 @@ class COMPOSITOR_EXPORT Compositor
|
|
|
| LayerAnimatorCollection layer_animator_collection_;
|
|
|
| - base::WeakPtrFactory<Compositor> schedule_draw_factory_;
|
| + base::WeakPtrFactory<Compositor> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Compositor);
|
| };
|
|
|