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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 24165003: Don't clone WebAnimation in WebLayerImpl::addAnimation(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL to land Created 7 years, 2 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 | « webkit/renderer/compositor_bindings/web_animation_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 3ef7940c528e2d629817d099ec756d03b591f812..28b49641dd59bb5056d22b0b553e6127f9b901cb 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -191,8 +191,12 @@ void WebLayerImpl::setAnimationDelegate(
}
bool WebLayerImpl::addAnimation(WebKit::WebAnimation* animation) {
- return layer_->AddAnimation(
- static_cast<WebAnimationImpl*>(animation)->CloneToAnimation());
+ bool result = layer_->AddAnimation(
+ static_cast<WebAnimationImpl*>(animation)->PassAnimation());
+#if defined(ANIMATION_OWNERSHIP_TRANSFER)
+ delete animation;
+#endif
+ return result;
}
void WebLayerImpl::removeAnimation(int animation_id) {
« no previous file with comments | « webkit/renderer/compositor_bindings/web_animation_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698