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 ef861b82f2e566107b40d6b40b0298c9d336a07a..a854ce0ecad761461063a31b4ec116af488a2d78 100644 |
| --- a/Source/core/platform/graphics/GraphicsLayer.cpp |
| +++ b/Source/core/platform/graphics/GraphicsLayer.cpp |
| @@ -1023,14 +1023,19 @@ 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); |
| +#if defined(ANIMATION_OWNERSHIP_NOT_TRANSFER) |
|
jamesr
2013/10/15 21:14:05
there's no need to test for this macro in the Blin
dshwang
2013/10/16 11:40:05
I don't think so.
If I changes it to "animation.le
|
| + return platformLayer()->addAnimation(animation.get()); |
| +#else |
| + return platformLayer()->addAnimation(animation.leakPtr()); |
| +#endif |
| } |
| void GraphicsLayer::pauseAnimation(int animationId, double timeOffset) |