Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2158)

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 947033002: CC Animations: Establish AnimationHost, AnimationTimeline and AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix MSVC warning. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f0a15aaed9fc15c1146157b50a13ffb022b82ea3..5f3e91b81eac78c1fd87a8e534ac5318af68dd87 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -19,7 +19,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"
@@ -597,6 +600,24 @@ void RenderWidgetCompositor::clearRootLayer() {
layer_tree_host_->SetRootLayer(scoped_refptr<cc::Layer>());
}
+void RenderWidgetCompositor::attachCompositorAnimationTimeline(
+ blink::WebCompositorAnimationTimeline* compositor_timeline) {
+ 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) {
+ 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) {
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698