summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-02-28 14:05:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-01 17:02:54 +0100
commit528e49dd2c83b6b2bde05bdc459543d3b1baf7f7 (patch)
treed0382e100f2c2f7dbbb383d28781a28f5c4ccbc1
parenta9f4572cc5ae46f3a286ba1b759392fea03460b9 (diff)
downloadqtwebkit-528e49dd2c83b6b2bde05bdc459543d3b1baf7f7.tar.gz
Revert "[TexMap] Flickering after transitions on Apple HTML5 demo"
This reverts commit 99be50464a52281c481dd8221144603fed582aa0. This change caused a regression and was undone in trunk. Change-Id: Ic04eb4a5b49c354c129ed5d8c4bbe8cc579dc8f1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-rw-r--r--Source/WebCore/ChangeLog45
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp35
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h17
3 files changed, 6 insertions, 91 deletions
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index a356e1911..e08750c67 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -88,51 +88,6 @@
* dom/Element.h:
(Element):
-2013-01-25 Alexander Paschenko <alexander.pashenko@lge.com>
-
- [TexMap] Flickering after transitions on Apple HTML5 demo
- https://bugs.webkit.org/show_bug.cgi?id=102501
-
- 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.
-
2013-01-04 John Mellor <johnme@chromium.org>
Early out from FontCache::releaseFontData if cached font data not found.
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
index 9d8a21010..d2a10aa66 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
@@ -264,25 +264,7 @@ void TextureMapperLayer::paintSelfAndChildrenWithReplica(const TextureMapperPain
paintSelfAndChildren(options);
}
-void TextureMapperLayer::setAnimatedTransform(const TransformationMatrix& matrix)
-{
- m_shouldUpdateCurrentTransformFromGraphicsLayer = false;
- setTransform(matrix);
-}
-
-void TextureMapperLayer::setAnimatedOpacity(float opacity)
-{
- m_shouldUpdateCurrentOpacityFromGraphicsLayer = false;
- setOpacity(opacity);
-}
-
#if ENABLE(CSS_FILTERS)
-void TextureMapperLayer::setAnimatedFilters(const FilterOperations& filters)
-{
- m_shouldUpdateCurrentFiltersFromGraphicsLayer = false;
- setFilters(filters);
-}
-
static bool shouldKeepContentTexture(const FilterOperations& filters)
{
for (size_t i = 0; i < filters.size(); ++i) {
@@ -430,17 +412,6 @@ void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* g
if (changeMask & AnimationChange)
m_animations = graphicsLayer->m_animations;
-
- if (changeMask & TransformChange)
- m_shouldUpdateCurrentTransformFromGraphicsLayer = true;
-
- if (changeMask & OpacityChange)
- m_shouldUpdateCurrentOpacityFromGraphicsLayer = true;
-
-#if ENABLE(CSS_FILTERS)
- if (changeMask & FilterChange)
- m_shouldUpdateCurrentFiltersFromGraphicsLayer = true;
-#endif
m_state.maskLayer = toTextureMapperLayer(graphicsLayer->maskLayer());
m_state.replicaLayer = toTextureMapperLayer(graphicsLayer->replicaLayer());
@@ -495,12 +466,12 @@ void TextureMapperLayer::applyAnimationsRecursively()
void TextureMapperLayer::syncAnimations()
{
m_animations.apply(this);
- if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform) && m_shouldUpdateCurrentTransformFromGraphicsLayer)
+ if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))
setTransform(m_state.transform);
- if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity) && m_shouldUpdateCurrentOpacityFromGraphicsLayer)
+ if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity))
setOpacity(m_state.opacity);
#if ENABLE(CSS_FILTERS)
- if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitFilter) && m_shouldUpdateCurrentFiltersFromGraphicsLayer)
+ if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitFilter))
setFilters(m_state.filters);
#endif
}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
index 08c273740..27a77f6fe 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
@@ -98,11 +98,6 @@ public:
, m_contentsLayer(0)
, m_opacity(1)
, m_centerZ(0)
- , m_shouldUpdateCurrentTransformFromGraphicsLayer(true)
- , m_shouldUpdateCurrentOpacityFromGraphicsLayer(true)
-#if ENABLE(CSS_FILTERS)
- , m_shouldUpdateCurrentFiltersFromGraphicsLayer(true)
-#endif
, m_textureMapper(0)
{ }
@@ -156,10 +151,10 @@ private:
void paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions&);
// GraphicsLayerAnimation::Client
- virtual void setAnimatedTransform(const TransformationMatrix& matrix) OVERRIDE;
- virtual void setAnimatedOpacity(float opacity) OVERRIDE;
+ void setAnimatedTransform(const TransformationMatrix& matrix) { setTransform(matrix); }
+ void setAnimatedOpacity(float opacity) { setOpacity(opacity); }
#if ENABLE(CSS_FILTERS)
- virtual void setAnimatedFilters(const FilterOperations& filters) OVERRIDE;
+ virtual void setAnimatedFilters(const FilterOperations& filters) { setFilters(filters); }
#endif
void syncAnimations();
@@ -193,12 +188,6 @@ private:
float m_centerZ;
String m_name;
- bool m_shouldUpdateCurrentTransformFromGraphicsLayer;
- bool m_shouldUpdateCurrentOpacityFromGraphicsLayer;
-#if ENABLE(CSS_FILTERS)
- bool m_shouldUpdateCurrentFiltersFromGraphicsLayer;
-#endif
-
struct State {
FloatPoint pos;
FloatPoint3D anchorPoint;