summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-12-02 19:12:05 -0800
committerChris Craik <ccraik@google.com>2011-12-05 17:01:13 -0800
commitc6151a04881a67d08d91237891fbc7cb82927219 (patch)
tree5a68a6baf72fe12d82f3a3d44e4e8eab87c87ff3 /Source/WebKit/android/nav/WebView.cpp
parent3fb3b3e0e16ce89f589b71ba2cc5942f42f0ac27 (diff)
downloadexternal_webkit-c6151a04881a67d08d91237891fbc7cb82927219.zip
external_webkit-c6151a04881a67d08d91237891fbc7cb82927219.tar.gz
external_webkit-c6151a04881a67d08d91237891fbc7cb82927219.tar.bz2
Don't deep copy animations, prepare animations on both trees
Bug: 5699085 Previously, animations were copied along with layer trees from the webkit to UI thread. This changes that to instead use a single object per animation with refcounting so that animations are kept consistent. Additionally, animations are now run on both the painting and drawing trees in the tree manager so that animated content clipped correctly during a tree swap. Change-Id: I79f0c0e47b717f9fdddf303eb7ec29efc4950aaf
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index fa25c46..d3b9591 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -1468,8 +1468,6 @@ void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndic
// TODO: the below tree copies are only necessary in software rendering
LayerAndroid* newCompositeRoot = static_cast<LayerAndroid*>(layer->getChild(0));
copyScrollPositionRecursive(compositeRoot(), newCompositeRoot);
- if (newCompositeRoot)
- newCompositeRoot->copyAnimationStartTimesRecursive(compositeRoot());
}
#endif
SkSafeUnref(m_baseLayer);
@@ -1915,10 +1913,13 @@ static void nativeUpdateDrawGLFunction(JNIEnv *env, jobject obj, jobject jrect,
static bool nativeEvaluateLayersAnimations(JNIEnv *env, jobject obj, jint nativeView)
{
+ // only call in software rendering, initialize and evaluate animations
#if USE(ACCELERATED_COMPOSITING)
LayerAndroid* root = ((WebView*)nativeView)->compositeRoot();
- if (root)
+ if (root) {
+ root->initAnimations();
return root->evaluateAnimations();
+ }
#endif
return false;
}