| Index: ui/compositor/compositor.h
|
| diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
| index bf61d29730e67aa70bd7c8533baa860a2335de42..57e4a8e28067ecb3804b06a5e30dcd765c73bea9 100644
|
| --- a/ui/compositor/compositor.h
|
| +++ b/ui/compositor/compositor.h
|
| @@ -25,6 +25,8 @@
|
| #include "ui/gfx/size.h"
|
| #include "ui/gfx/vector2d.h"
|
|
|
| +class SkBitmap;
|
| +
|
| namespace base {
|
| class MessageLoopProxy;
|
| class RunLoop;
|
| @@ -172,6 +174,9 @@
|
| // The scale factor of the device that this compositor is
|
| // compositing layers on.
|
| float device_scale_factor() const { return device_scale_factor_; }
|
| +
|
| + // Draws the scene created by the layer tree and any visual effects.
|
| + void Draw();
|
|
|
| // Where possible, draws are scissored to a damage region calculated from
|
| // changes to layer properties. This bypasses that and indicates that
|
| @@ -259,8 +264,13 @@
|
| void DidCompleteSwapBuffers() override;
|
|
|
| // cc::LayerTreeHostSingleThreadClient implementation.
|
| + void ScheduleComposite() override;
|
| + void ScheduleAnimation() override;
|
| void DidPostSwapBuffers() override;
|
| void DidAbortSwapBuffers() override;
|
| +
|
| + int last_started_frame() { return last_started_frame_; }
|
| + int last_ended_frame() { return last_ended_frame_; }
|
|
|
| bool IsLocked() { return compositor_lock_ != NULL; }
|
|
|
| @@ -285,6 +295,9 @@
|
|
|
| // Called to release any pending CompositorLock
|
| void CancelCompositorLock();
|
| +
|
| + // Notifies the compositor that compositing is complete.
|
| + void NotifyEnd();
|
|
|
| gfx::Size size_;
|
|
|
| @@ -317,6 +330,15 @@
|
|
|
| CompositorLock* compositor_lock_;
|
|
|
| + // Prevent more than one draw from being scheduled.
|
| + bool defer_draw_scheduling_;
|
| +
|
| + // Used to prevent Draw()s while a composite is in progress.
|
| + bool waiting_on_compositing_end_;
|
| + bool draw_on_compositing_end_;
|
| + enum SwapState { SWAP_NONE, SWAP_POSTED, SWAP_COMPLETED };
|
| + SwapState swap_state_;
|
| +
|
| LayerAnimatorCollection layer_animator_collection_;
|
|
|
| base::WeakPtrFactory<Compositor> weak_ptr_factory_;
|
|
|