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

Unified Diff: Source/core/platform/graphics/GraphicsLayer.cpp

Issue 23834010: Change WebLayer::addAnimation to transfer ownership of WebAnimation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Apply GraphicsLayerTest also 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 | « Source/core/platform/graphics/GraphicsLayer.h ('k') | Source/core/rendering/CompositedLayerMapping.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp
index 6b965ce0241ee39ea58265f2db112365c93a8968..bbbc5ea6bbd55692e66939292433c9230e601e23 100644
--- a/Source/core/platform/graphics/GraphicsLayer.cpp
+++ b/Source/core/platform/graphics/GraphicsLayer.cpp
@@ -1023,14 +1023,15 @@ void GraphicsLayer::setContentsToMedia(WebLayer* layer)
setContentsTo(ContentsLayerForVideo, layer);
}
-bool GraphicsLayer::addAnimation(WebAnimation* animation)
+bool GraphicsLayer::addAnimation(PassOwnPtr<WebAnimation> popAnimation)
{
+ OwnPtr<WebAnimation> animation(popAnimation);
ASSERT(animation);
platformLayer()->setAnimationDelegate(this);
// Remove any existing animations with the same animation id and target property.
platformLayer()->removeAnimation(animation->id(), animation->targetProperty());
- return platformLayer()->addAnimation(animation);
+ return platformLayer()->addAnimation(animation.leakPtr());
}
void GraphicsLayer::pauseAnimation(int animationId, double timeOffset)
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | Source/core/rendering/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698