From c6151a04881a67d08d91237891fbc7cb82927219 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 2 Dec 2011 19:12:05 -0800 Subject: 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 --- Source/WebKit/android/nav/WebView.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/WebKit/android/nav/WebView.cpp') 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(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; } -- cgit v1.1