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..f4ee179b84a63b3850e8e1b2dd19af997d743634 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, |
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() const OVERRIDE; |
+ virtual void SetNeedsBeginFrames(bool needs_begin_frames) OVERRIDE; |
+ virtual void DidFinishFrame(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(); |