diff options
| -rw-r--r-- | Source/WebCore/platform/graphics/android/LayerAndroid.cpp | 14 | ||||
| -rw-r--r-- | Source/WebCore/platform/graphics/android/LayerAndroid.h | 2 | ||||
| -rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 3 | 
3 files changed, 19 insertions, 0 deletions
| diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp index 1cd2b1a..0557847 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -902,6 +902,20 @@ void LayerAndroid::setIsPainting(Layer* drawingTree)      obtainTextureForPainting(drawingLayer);  } +void LayerAndroid::copyAnimationStartTimesRecursive(LayerAndroid* oldTree) +{ +    // used for copying UI-side animation start times in software rendering mode +    if (!oldTree) +        return; + +    for (int i = 0; i < countChildren(); i++) +        this->getChild(i)->copyAnimationStartTimesRecursive(oldTree); + +    LayerAndroid* layer = oldTree->findById(uniqueId()); +    if (layer) +        copyAnimationStartTimes(layer); +} +  void LayerAndroid::copyAnimationStartTimes(LayerAndroid* oldLayer)  {      if (!oldLayer) diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.h b/Source/WebCore/platform/graphics/android/LayerAndroid.h index cc96fae..5c13899 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.h @@ -303,6 +303,8 @@ public:      bool hasText() { return m_hasText; }      void checkTextPresence(); +    void copyAnimationStartTimesRecursive(LayerAndroid* oldTree); +  // rendering asset management      void swapTiles();      void setIsDrawing(bool isDrawing); diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 300b58e..fa25c46 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -1465,8 +1465,11 @@ void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndic  #if ENABLE(ANDROID_OVERFLOW_SCROLL)      if (layer) { +        // 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); | 
