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

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 11830056: Enable accelerated animations for orphaned layers (Closed) Base URL: http://git.chromium.org/chromium/src.git@MakeLayerTreeHostAnimateLayersTakeWallClockTime
Patch Set: Created 7 years, 11 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
Index: webkit/compositor_bindings/web_layer_tree_view_impl.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.cc b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
index 5165f98eb0d0be11fd6e2ef966ea69620df2480e..f5b53740c2cfa69ee1a5afdce36bbd8c4994a3d5 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -150,17 +150,10 @@ void WebLayerTreeViewImpl::composite()
m_layerTreeHost->composite();
}
-// TODO(ajuma): Remove this after the WebKit patch to use the 2-argument version lands.
-void WebLayerTreeViewImpl::updateAnimations(double frameBeginTimeSeconds)
-{
- base::TimeTicks frameBeginTime = base::TimeTicks::FromInternalValue(frameBeginTimeSeconds * base::Time::kMicrosecondsPerSecond);
- m_layerTreeHost->updateAnimations(frameBeginTime, base::Time::Now());
-}
-
void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTimeSeconds, double wallClockFrameBeginTimeSeconds)
{
base::TimeTicks monotonicFrameBeginTime = base::TimeTicks::FromInternalValue(monotonicFrameBeginTimeSeconds * base::Time::kMicrosecondsPerSecond);
- base::Time wallClockFrameBeginTime = base::Time::FromInternalValue(wallClockFrameBeginTimeSeconds* base::Time::kMicrosecondsPerSecond);
+ base::Time wallClockFrameBeginTime = base::Time::FromInternalValue(wallClockFrameBeginTimeSeconds * base::Time::kMicrosecondsPerSecond);
m_layerTreeHost->updateAnimations(monotonicFrameBeginTime, wallClockFrameBeginTime);
}
@@ -184,6 +177,12 @@ void WebLayerTreeViewImpl::setDeferCommits(bool deferCommits)
m_layerTreeHost->setDeferCommits(deferCommits);
}
+void WebLayerTreeViewImpl::registerForAnimations(WebLayer* layer)
+{
+ cc::Layer* ccLayer = static_cast<WebLayerImpl*>(layer)->layer();
+ ccLayer->layerAnimationController()->setAnimationRegistrar(m_layerTreeHost->animationRegistrar());
+}
+
void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const
{
m_layerTreeHost->renderingStats(
« cc/layer_animation_controller.cc ('K') | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698