diff options
author | Nicolas Roard <nicolas@android.com> | 2010-02-11 18:40:34 +0000 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2010-02-12 11:29:24 +0000 |
commit | fe41360961a5f02a9f54dbe4922d301ef4bc4a20 (patch) | |
tree | 3fb6dcaafc452ac68c36ac518eb4f3c957270a20 /WebCore/platform/graphics/android/AndroidAnimation.cpp | |
parent | c557fc762122cd1bbc9a15778b86728c884a2dfb (diff) | |
download | external_webkit-fe41360961a5f02a9f54dbe4922d301ef4bc4a20.zip external_webkit-fe41360961a5f02a9f54dbe4922d301ef4bc4a20.tar.gz external_webkit-fe41360961a5f02a9f54dbe4922d301ef4bc4a20.tar.bz2 |
Put back the animations in the UI thread
Diffstat (limited to 'WebCore/platform/graphics/android/AndroidAnimation.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/AndroidAnimation.cpp | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/WebCore/platform/graphics/android/AndroidAnimation.cpp b/WebCore/platform/graphics/android/AndroidAnimation.cpp index ca1acbe..2b1b252 100644 --- a/WebCore/platform/graphics/android/AndroidAnimation.cpp +++ b/WebCore/platform/graphics/android/AndroidAnimation.cpp @@ -30,18 +30,6 @@ namespace WebCore { -void AndroidTransformAnimationValue::apply() -{ - if (m_doTranslation) - m_layer->setTranslation(m_translation.x(), m_translation.y()); - - if (m_doScaling) - m_layer->setScale(m_scale.x(), m_scale.y()); - - if (m_doRotation) - m_layer->setRotation(m_rotation); -} - static long gDebugAndroidAnimationInstances; long AndroidAnimation::instancesCount() @@ -125,13 +113,6 @@ bool AndroidAnimation::checkIterationsAndProgress(double time, float* finalProgr return true; } -PassRefPtr<AndroidAnimationValue> AndroidAnimation::result() -{ - if (!m_result) - return 0; - return m_result.release(); -} - PassRefPtr<AndroidOpacityAnimation> AndroidOpacityAnimation::create( float fromValue, float toValue, @@ -179,7 +160,7 @@ bool AndroidOpacityAnimation::evaluate(LayerAndroid* layer, double time) return true; float value = m_fromValue + ((m_toValue - m_fromValue) * progress); - m_result = AndroidOpacityAnimationValue::create(layer, value); + layer->setOpacity(value); return true; } @@ -294,14 +275,15 @@ bool AndroidTransformAnimation::evaluate(LayerAndroid* layer, double time) float sz = m_fromScaleZ + (m_toScaleZ - m_fromScaleZ) * progress; float a = m_fromAngle + (m_toAngle - m_fromAngle) * progress; - FloatPoint translation(x, y); - FloatPoint3D scale(sx, sy, sz); - RefPtr<AndroidTransformAnimationValue> result = - AndroidTransformAnimationValue::create(layer, translation, scale, a); - result->setDoTranslation(m_doTranslation); - result->setDoScaling(m_doScaling); - result->setDoRotation(m_doRotation); - m_result = result.release(); + if (m_doTranslation) + layer->setTranslation(x, y); + + if (m_doScaling) + layer->setScale(sx, sy); + + if (m_doRotation) + layer->setRotation(a); + return true; } |