diff options
Diffstat (limited to 'content')
4 files changed, 10 insertions, 12 deletions
diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h index 9b75bd9..e24d581 100644 --- a/content/browser/renderer_host/compositor_impl_android.h +++ b/content/browser/renderer_host/compositor_impl_android.h @@ -69,7 +69,7 @@ class CONTENT_EXPORT CompositorImpl // LayerTreeHostClient implementation. virtual void WillBeginMainFrame(int frame_id) OVERRIDE {} virtual void DidBeginMainFrame() OVERRIDE {} - virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE {} + virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE {} virtual void Layout() OVERRIDE; virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, float page_scale) OVERRIDE {} diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index 23230ee..d21b85b 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -22,6 +22,7 @@ #include "cc/debug/micro_benchmark.h" #include "cc/input/layer_selection_bound.h" #include "cc/layers/layer.h" +#include "cc/output/begin_frame_args.h" #include "cc/output/copy_output_request.h" #include "cc/output/copy_output_result.h" #include "cc/resources/single_release_callback.h" @@ -55,10 +56,11 @@ namespace cc { class Layer; } +using blink::WebBeginFrameArgs; using blink::WebFloatPoint; +using blink::WebRect; using blink::WebSelectionBound; using blink::WebSize; -using blink::WebRect; namespace content { namespace { @@ -437,10 +439,6 @@ bool RenderWidgetCompositor::BeginMainFrameRequested() const { return layer_tree_host_->BeginMainFrameRequested(); } -void RenderWidgetCompositor::UpdateAnimations(base::TimeTicks time) { - layer_tree_host_->UpdateClientAnimations(time); -} - void RenderWidgetCompositor::SetNeedsDisplayOnAllLayers() { layer_tree_host_->SetNeedsDisplayOnAllLayers(); } @@ -758,9 +756,10 @@ void RenderWidgetCompositor::DidBeginMainFrame() { widget_->InstrumentDidBeginFrame(); } -void RenderWidgetCompositor::Animate(base::TimeTicks frame_begin_time) { - widget_->webwidget()->animate( - (frame_begin_time - base::TimeTicks()).InSecondsF()); +void RenderWidgetCompositor::BeginMainFrame(const cc::BeginFrameArgs& args) { + double frame_time = (args.frame_time - base::TimeTicks()).InSecondsF(); + WebBeginFrameArgs web_begin_frame_args = WebBeginFrameArgs(frame_time); + widget_->webwidget()->beginFrame(web_begin_frame_args); } void RenderWidgetCompositor::Layout() { diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index e0541ec..95f9179 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h @@ -46,7 +46,6 @@ class RenderWidgetCompositor : public blink::WebLayerTreeView, const base::WeakPtr<cc::InputHandler>& GetInputHandler(); void SetSuppressScheduleComposite(bool suppress); bool BeginMainFrameRequested() const; - void UpdateAnimations(base::TimeTicks time); void SetNeedsDisplayOnAllLayers(); void SetRasterizeOnlyVisibleContent(); void UpdateTopControlsState(cc::TopControlsState constraints, @@ -129,7 +128,7 @@ class RenderWidgetCompositor : public blink::WebLayerTreeView, // cc::LayerTreeHostClient implementation. virtual void WillBeginMainFrame(int frame_id) OVERRIDE; virtual void DidBeginMainFrame() OVERRIDE; - virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; + virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE; virtual void Layout() OVERRIDE; virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, float page_scale) OVERRIDE; diff --git a/content/test/web_layer_tree_view_impl_for_testing.h b/content/test/web_layer_tree_view_impl_for_testing.h index 13d6ee4..26a6260 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.h +++ b/content/test/web_layer_tree_view_impl_for_testing.h @@ -67,7 +67,7 @@ class WebLayerTreeViewImplForTesting // cc::LayerTreeHostClient implementation. virtual void WillBeginMainFrame(int frame_id) OVERRIDE {} virtual void DidBeginMainFrame() OVERRIDE {} - virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE {} + virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE {} virtual void Layout() OVERRIDE; virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, float page_scale) OVERRIDE; |