diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-02-28 14:06:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-01 17:03:01 +0100 |
commit | b5f797c60027cdaa494b30bbe61c307f3e0a18ff (patch) | |
tree | b60e0dbdaa0eb932fed997ce785b918fd9a8fde8 | |
parent | 528e49dd2c83b6b2bde05bdc459543d3b1baf7f7 (diff) | |
download | qtwebkit-b5f797c60027cdaa494b30bbe61c307f3e0a18ff.tar.gz |
[TexMap] Flickering after transitions on Apple HTML5 demo
https://bugs.webkit.org/show_bug.cgi?id=102501
Reviewed by Noam Rosenthal.
Notify about animation start after the new animation is actually commited.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(GraphicsLayerTextureMapper):
Change-Id: Iee72191e03d2dba4c90e7d3ba70e0be3f165aead
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r-- | Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp index c13f892b0..136dc2169 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp @@ -60,6 +60,7 @@ GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* clie , m_debugBorderWidth(0) , m_contentsLayer(0) , m_animationStartedTimer(this, &GraphicsLayerTextureMapper::animationStartedTimerFired) + , m_animationStartTime(0) { } @@ -542,7 +543,8 @@ bool GraphicsLayerTextureMapper::addAnimation(const KeyframeValueList& valueList if (valueList.property() == AnimatedPropertyWebkitTransform) listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0; - m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, WTF::currentTime() - timeOffset, listsMatch)); + m_animationStartTime = WTF::currentTime() - timeOffset; + m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, m_animationStartTime, listsMatch)); notifyChange(TextureMapperLayer::AnimationChange); m_animationStartedTimer.startOneShot(0); return true; @@ -567,7 +569,7 @@ void GraphicsLayerTextureMapper::removeAnimation(const String& animationName) void GraphicsLayerTextureMapper::animationStartedTimerFired(Timer<GraphicsLayerTextureMapper>*) { - client()->notifyAnimationStarted(this, /* DOM time */ WTF::currentTime()); + client()->notifyAnimationStarted(this, m_animationStartTime); } void GraphicsLayerTextureMapper::setDebugBorder(const Color& color, float width) diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h index 7051a7d97..00b0fe7c1 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h @@ -122,6 +122,7 @@ private: FloatRect m_needsDisplayRect; GraphicsLayerAnimations m_animations; Timer<GraphicsLayerTextureMapper> m_animationStartedTimer; + double m_animationStartTime; }; inline static GraphicsLayerTextureMapper* toGraphicsLayerTextureMapper(GraphicsLayer* layer) |