| Index: cc/layer.cc
|
| diff --git a/cc/layer.cc b/cc/layer.cc
|
| index 8025f0dc7cd8878ab879fbab214040ef55e393fb..8be585312dad6193b606d06a160609135e15b8b0 100644
|
| --- a/cc/layer.cc
|
| +++ b/cc/layer.cc
|
| @@ -746,23 +746,15 @@ bool Layer::IsActive() const
|
| return true;
|
| }
|
|
|
| -bool Layer::addAnimation(scoped_ptr <Animation> animation)
|
| +bool Layer::IsOrphaned() const
|
| {
|
| - // WebCore currently assumes that accelerated animations will start soon
|
| - // after the animation is added. However we cannot guarantee that if we do
|
| - // not have a layerTreeHost that will setNeedsCommit().
|
| - // Unfortunately, the fix below to guarantee correctness causes performance
|
| - // regressions on Android, since Android has shipped for a long time
|
| - // with all animations accelerated. For this reason, we will live with
|
| - // this bug only on Android until the bug is fixed.
|
| - // http://crbug.com/129683
|
| -#if !defined(OS_ANDROID)
|
| - if (!m_layerTreeHost)
|
| - return false;
|
| + return !m_layerTreeHost;
|
| +}
|
|
|
| - if (!m_layerTreeHost->settings().acceleratedAnimationEnabled)
|
| +bool Layer::addAnimation(scoped_ptr <Animation> animation)
|
| +{
|
| + if (!m_layerAnimationController->animationRegistrar())
|
| return false;
|
| -#endif
|
|
|
| m_layerAnimationController->addAnimation(animation.Pass());
|
| setNeedsCommit();
|
| @@ -810,6 +802,7 @@ scoped_refptr<LayerAnimationController> Layer::releaseLayerAnimationController()
|
| scoped_refptr<LayerAnimationController> toReturn = m_layerAnimationController;
|
| m_layerAnimationController = LayerAnimationController::create(id());
|
| m_layerAnimationController->addObserver(this);
|
| + m_layerAnimationController->setAnimationRegistrar(toReturn->animationRegistrar());
|
| return toReturn;
|
| }
|
|
|
|
|