diff options
author | epenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 01:47:57 +0000 |
---|---|---|
committer | epenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 01:47:57 +0000 |
commit | 9e5e242b661330481ceabb2f8eba5f0778e2516d (patch) | |
tree | 3289254bce8d566374457a8e810843e6da230fe5 /cc | |
parent | ce6c9d095f27c4ee5a0bdaa713e8bf94b24eae83 (diff) | |
download | chromium_src-9e5e242b661330481ceabb2f8eba5f0778e2516d.zip chromium_src-9e5e242b661330481ceabb2f8eba5f0778e2516d.tar.gz chromium_src-9e5e242b661330481ceabb2f8eba5f0778e2516d.tar.bz2 |
cc: Enable all animations on Android.
We are already shipping this way, and disabling some animations causes performance regressions.
BUG=129683
Review URL: https://chromiumcodereview.appspot.com/11316036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layer.cc | 7 | ||||
-rw-r--r-- | cc/layer_unittest.cc | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/cc/layer.cc b/cc/layer.cc index c69418d..5b608ce 100644 --- a/cc/layer.cc +++ b/cc/layer.cc @@ -748,11 +748,18 @@ bool Layer::addAnimation(scoped_ptr <ActiveAnimation> animation) // 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; if (!m_layerTreeHost->settings().acceleratedAnimationEnabled) return false; +#endif m_layerAnimationController->addAnimation(animation.Pass()); if (m_layerTreeHost) { diff --git a/cc/layer_unittest.cc b/cc/layer_unittest.cc index 885bbbd..4ccd171 100644 --- a/cc/layer_unittest.cc +++ b/cc/layer_unittest.cc @@ -777,7 +777,13 @@ TEST(LayerLayerTreeHostTest, shouldNotAddAnimationWithoutLayerTreeHost) scoped_refptr<Layer> layer = Layer::create(); // Case 1: without a layerTreeHost, the animation should not be accepted. +#if defined(OS_ANDROID) + // All animations are enabled on Android to avoid performance regressions. + // Other platforms will be enabled with http://crbug.com/129683 + EXPECT_TRUE(addTestAnimation(layer.get())); +#else EXPECT_FALSE(addTestAnimation(layer.get())); +#endif scoped_ptr<FakeLayerImplTreeHost> layerTreeHost(FakeLayerImplTreeHost::create()); layerTreeHost->setRootLayer(layer.get()); |