Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.h |
| diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h |
| index 64e20993ca10a46e7c92eb6d087680bb854c9d79..f17f70c354c87fceca4f483c8ab07c694534de60 100644 |
| --- a/cc/trees/layer_tree_host_impl.h |
| +++ b/cc/trees/layer_tree_host_impl.h |
| @@ -32,6 +32,7 @@ |
| #include "cc/resources/resource_provider.h" |
| #include "cc/resources/tile_manager.h" |
| #include "cc/scheduler/draw_result.h" |
| +#include "cc/scheduler/frame_source.h" |
| #include "skia/ext/refptr.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| #include "ui/gfx/rect.h" |
| @@ -73,7 +74,6 @@ class LayerTreeHostImplClient { |
| virtual void SetMaxSwapsPendingOnImplThread(int max) = 0; |
| virtual void DidSwapBuffersOnImplThread() = 0; |
| virtual void DidSwapBuffersCompleteOnImplThread() = 0; |
| - virtual void BeginFrame(const BeginFrameArgs& args) = 0; |
| virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| virtual void NotifyReadyToActivate() = 0; |
| // Please call these 3 functions through |
| @@ -112,6 +112,7 @@ class CC_EXPORT LayerTreeHostImpl |
| public OutputSurfaceClient, |
| public TopControlsManagerClient, |
| public ScrollbarAnimationControllerClient, |
| + public BeginFrameSource, |
|
brianderson
2014/09/13 01:38:13
Can the OutputSurface be the BeginFrameSource inst
|
| public base::SupportsWeakPtr<LayerTreeHostImpl> { |
| public: |
| static scoped_ptr<LayerTreeHostImpl> Create( |
| @@ -123,6 +124,11 @@ class CC_EXPORT LayerTreeHostImpl |
| int id); |
| virtual ~LayerTreeHostImpl(); |
| + // BeginFrameSource implementation |
| + virtual bool NeedsBeginFrames() OVERRIDE; |
| + virtual void SetNeedsBeginFrames(bool needs_begin_frames) OVERRIDE; |
| + virtual void FinishedFrame(size_t remaining_frames) OVERRIDE{}; |
| + |
| // InputHandler implementation |
| virtual void BindToClient(InputHandlerClient* client) OVERRIDE; |
| virtual InputHandler::ScrollStatus ScrollBegin( |
| @@ -296,7 +302,6 @@ class CC_EXPORT LayerTreeHostImpl |
| const RendererCapabilitiesImpl& GetRendererCapabilities() const; |
| virtual bool SwapBuffers(const FrameData& frame); |
| - void SetNeedsBeginFrame(bool enable); |
| virtual void WillBeginImplFrame(const BeginFrameArgs& args); |
| void DidModifyTilePriorities(); |
| @@ -428,9 +433,7 @@ class CC_EXPORT LayerTreeHostImpl |
| return begin_impl_frame_interval_; |
| } |
| - void AsValueInto(base::debug::TracedValue* value) const { |
| - return AsValueWithFrameInto(NULL, value); |
| - } |
| + virtual void AsValueInto(base::debug::TracedValue* value) const OVERRIDE; |
| void AsValueWithFrameInto(FrameData* frame, |
| base::debug::TracedValue* value) const; |
| scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; |
| @@ -510,6 +513,7 @@ class CC_EXPORT LayerTreeHostImpl |
| LayerTreeHostImplClient* client_; |
| Proxy* proxy_; |
| + bool needs_begin_frames_; |
| private: |
| void CreateAndSetRenderer(); |