[TexMap] Flickering after transitions on Apple HTML5 demo
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jan 2013 14:39:22 +0000 (14:39 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jan 2013 14:39:22 +0000 (14:39 +0000)
commit8046d8ddc60380f7e4b94c8499a8b0179375ffca
tree8882c0168634408b9ace4fb56fbd939d664eb5cb
parent6f708eac9f2c660c6aa6db74ae4c1f54ec0afe8d
[TexMap] Flickering after transitions on Apple HTML5 demo
https://bugs.webkit.org/show_bug.cgi?id=102501

Patch by Alexander Paschenko <alexander.pashenko@lge.com> on 2013-01-25
Reviewed by Noam Rosenthal.

The problem is caused by inconsistent state of TextureMapperLayer's transformation matrix
and opacity data during and after the end of animation.
This patch solves the problem by introducing three additional private flags
to TextureMapperLayer:
m_shouldUpdateCurrentTransformFromGraphicsLayer,
m_shouldUpdateCurrentOpacityFromGraphicsLayer, and
m_shouldUpdateCurrentFiltersFromGraphicsLayer.
The latter has been introduced in order to avoid similar future problems
with m_currentFilters.
On these flags' basis, TextureMapperLayer is able to decide whether to update
its inner state or not.
These flags themselves are set based on GraphicsLayerTextureMapper's changeMask
which indicates what details of the state have been changed since the last sync.

No new tests - this doesn't expose any testable surface.
Eyes-only check has been made to ensure that the problem is gone now.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setAnimatedTransform):
sets m_shouldUpdateCurrentTransformFromGraphicsLayer to false and
updates m_currentTransform based on the updated state from GraphicsLayerAnimation.
(WebCore):
(WebCore::TextureMapperLayer::setAnimatedOpacity):
sets m_shouldUpdateCurrentOpacityFromGraphicsLayer to false and
updates m_currentOpacity based on the updated state from GraphicsLayerAnimation.
(WebCore::TextureMapperLayer::setAnimatedFilters):
sets m_shouldUpdateCurrentFiltersFromGraphicsLayer to false and
updates m_currentFilters based on the updated state from GraphicsLayerAnimation.
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
sets m_shouldUpdateCurrent* flags based on GLTM's changeMask. Also illegal modification
of m_currentTransform that caused flickering has been removed from this method.
(WebCore::TextureMapperLayer::syncAnimations): updates m_currentTransform and/or
m_currentOpacity and/or m_currentFilters if corresponding flags allow to do so.
* platform/graphics/texmap/TextureMapperLayer.h:
(WebCore::TextureMapperLayer::TextureMapperLayer): aforementioned flags
get initialized in ctor.
(TextureMapperLayer): aforementioned flags are declared in the class.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h