Index: ui/compositor/compositor.h |
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h |
index b2d27797de7fc1af7938ba330d02eb39f891cbc5..64c9201372c7bba12b714fd3692869b7550efff8 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/base/compositor/begin_frame_manager.h" |
#include "ui/compositor/compositor_animation_observer.h" |
#include "ui/compositor/compositor_export.h" |
#include "ui/compositor/compositor_observer.h" |
@@ -48,8 +49,8 @@ struct Mailbox; |
namespace ui { |
+class BeginFrameManager; |
class Compositor; |
-class CompositorVSyncManager; |
class Layer; |
class Reflector; |
class Texture; |
@@ -127,7 +128,8 @@ class COMPOSITOR_EXPORT CompositorLock |
// view hierarchy. |
class COMPOSITOR_EXPORT Compositor |
: NON_EXPORTED_BASE(public cc::LayerTreeHostClient), |
- NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient) { |
+ NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient), |
+ NON_EXPORTED_BASE(public ui::BeginFrameManager::Delegate) { |
public: |
Compositor(gfx::AcceleratedWidget widget, |
ui::ContextFactory* context_factory, |
@@ -184,8 +186,9 @@ class COMPOSITOR_EXPORT Compositor |
// Returns the widget for this compositor. |
gfx::AcceleratedWidget widget() const { return widget_; } |
- // Returns the vsync manager for this compositor. |
- scoped_refptr<CompositorVSyncManager> vsync_manager() const; |
+ BeginFrameManager* begin_frame_manager() const { |
+ return begin_frame_manager_.get(); |
+ } |
// Compositor does not own observers. It is the responsibility of the |
// observer to remove itself when it is done observing. |
@@ -227,11 +230,15 @@ class COMPOSITOR_EXPORT Compositor |
virtual void DidCommit() OVERRIDE; |
virtual void DidCommitAndDrawFrame() OVERRIDE; |
virtual void DidCompleteSwapBuffers() OVERRIDE; |
+ virtual void SendBeginFrame(const cc::BeginFrameArgs& args) OVERRIDE; |
// cc::LayerTreeHostSingleThreadClient implementation. |
virtual void DidPostSwapBuffers() OVERRIDE; |
virtual void DidAbortSwapBuffers() OVERRIDE; |
+ // ui::BeginFrameManager::Delegate implementation. |
+ virtual void RequestBeginFrame() OVERRIDE; |
+ |
bool IsLocked() { return compositor_lock_ != NULL; } |
const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; |
@@ -267,8 +274,8 @@ class COMPOSITOR_EXPORT Compositor |
scoped_refptr<base::MessageLoopProxy> compositor_thread_loop_; |
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
- // The manager of vsync parameters for this compositor. |
- scoped_refptr<CompositorVSyncManager> vsync_manager_; |
+ // The manager of BeginFrame routing. |
+ scoped_ptr<BeginFrameManager> begin_frame_manager_; |
// The device scale factor of the monitor that this compositor is compositing |
// layers on. |