Chromium Code Reviews| Index: content/renderer/gpu/render_widget_compositor.cc |
| diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc |
| index 7cdabacba5b993708bd5227ff2415ef897e7a2f2..85830bce2bdc4a3357a15cefa251fccc2e4e2895 100644 |
| --- a/content/renderer/gpu/render_widget_compositor.cc |
| +++ b/content/renderer/gpu/render_widget_compositor.cc |
| @@ -18,7 +18,10 @@ |
| #include "base/thread_task_runner_handle.h" |
| #include "base/time/time.h" |
| #include "base/values.h" |
| +#include "cc/animation/animation_host.h" |
| +#include "cc/animation/animation_timeline.h" |
| #include "cc/base/switches.h" |
| +#include "cc/blink/web_compositor_animation_timeline_impl.h" |
| #include "cc/blink/web_layer_impl.h" |
| #include "cc/debug/layer_tree_debug_state.h" |
| #include "cc/debug/micro_benchmark.h" |
| @@ -584,6 +587,24 @@ void RenderWidgetCompositor::clearRootLayer() { |
| layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>()); |
| } |
| +void RenderWidgetCompositor::attachCompositorAnimationTimeline( |
| + blink::WebCompositorAnimationTimeline* compositor_timeline) { |
|
piman
2015/06/23 02:01:06
nit: should compositor_timeline be a const blink::
loyso (OOO)
2015/06/23 05:22:07
Well, technically we can make it const (plus, it r
|
| + DCHECK(compositor_timeline); |
| + DCHECK(layer_tree_host_->animation_host()); |
| + layer_tree_host_->animation_host()->AddAnimationTimeline( |
| + static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>( |
| + compositor_timeline)->animation_timeline()); |
| +} |
| + |
| +void RenderWidgetCompositor::detachCompositorAnimationTimeline( |
| + blink::WebCompositorAnimationTimeline* compositor_timeline) { |
|
piman
2015/06/23 02:01:06
nit: same here.
|
| + DCHECK(compositor_timeline); |
| + DCHECK(layer_tree_host_->animation_host()); |
| + layer_tree_host_->animation_host()->RemoveAnimationTimeline( |
| + static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>( |
| + compositor_timeline)->animation_timeline()); |
| +} |
| + |
| void RenderWidgetCompositor::setViewportSize( |
| const WebSize&, |
| const WebSize& device_viewport_size) { |