Chromium Code Reviews| Index: Source/core/platform/graphics/GraphicsLayer.cpp |
| diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp |
| index 0c4d346a14f02a95b2fd6aae584791b0188114b4..b5a7900e6ce4bff5edbf90fac681bdca2b2458c4 100644 |
| --- a/Source/core/platform/graphics/GraphicsLayer.cpp |
| +++ b/Source/core/platform/graphics/GraphicsLayer.cpp |
| @@ -969,14 +969,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.get()); |
|
jamesr
2013/09/20 18:52:14
you need to leakPtr() here, right? otherwise ~OwnP
dshwang
2013/09/20 19:03:58
WebLayerImpl does not delete a WebAnimation instan
|
| } |
| void GraphicsLayer::pauseAnimation(int animationId, double timeOffset) |