Changeset 140825 in webkit
- Timestamp:
- Jan 25, 2013 6:39:22 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140823 r140825 1 2013-01-25 Alexander Paschenko <alexander.pashenko@lge.com> 2 3 [TexMap] Flickering after transitions on Apple HTML5 demo 4 https://bugs.webkit.org/show_bug.cgi?id=102501 5 6 Reviewed by Noam Rosenthal. 7 8 The problem is caused by inconsistent state of TextureMapperLayer's transformation matrix 9 and opacity data during and after the end of animation. 10 This patch solves the problem by introducing three additional private flags 11 to TextureMapperLayer: 12 m_shouldUpdateCurrentTransformFromGraphicsLayer, 13 m_shouldUpdateCurrentOpacityFromGraphicsLayer, and 14 m_shouldUpdateCurrentFiltersFromGraphicsLayer. 15 The latter has been introduced in order to avoid similar future problems 16 with m_currentFilters. 17 On these flags' basis, TextureMapperLayer is able to decide whether to update 18 its inner state or not. 19 These flags themselves are set based on GraphicsLayerTextureMapper's changeMask 20 which indicates what details of the state have been changed since the last sync. 21 22 No new tests - this doesn't expose any testable surface. 23 Eyes-only check has been made to ensure that the problem is gone now. 24 25 * platform/graphics/texmap/TextureMapperLayer.cpp: 26 (WebCore::TextureMapperLayer::setAnimatedTransform): 27 sets m_shouldUpdateCurrentTransformFromGraphicsLayer to false and 28 updates m_currentTransform based on the updated state from GraphicsLayerAnimation. 29 (WebCore): 30 (WebCore::TextureMapperLayer::setAnimatedOpacity): 31 sets m_shouldUpdateCurrentOpacityFromGraphicsLayer to false and 32 updates m_currentOpacity based on the updated state from GraphicsLayerAnimation. 33 (WebCore::TextureMapperLayer::setAnimatedFilters): 34 sets m_shouldUpdateCurrentFiltersFromGraphicsLayer to false and 35 updates m_currentFilters based on the updated state from GraphicsLayerAnimation. 36 (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly): 37 sets m_shouldUpdateCurrent* flags based on GLTM's changeMask. Also illegal modification 38 of m_currentTransform that caused flickering has been removed from this method. 39 (WebCore::TextureMapperLayer::syncAnimations): updates m_currentTransform and/or 40 m_currentOpacity and/or m_currentFilters if corresponding flags allow to do so. 41 * platform/graphics/texmap/TextureMapperLayer.h: 42 (WebCore::TextureMapperLayer::TextureMapperLayer): aforementioned flags 43 get initialized in ctor. 44 (TextureMapperLayer): aforementioned flags are declared in the class. 45 46 1 47 2013-01-25 Marja Hölttä <marja@chromium.org> 2 48 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
r140821 r140825 297 297 } 298 298 299 #if ENABLE(CSS_FILTERS) 299 void TextureMapperLayer::setAnimatedTransform(const TransformationMatrix& matrix) 300 { 301 m_shouldUpdateCurrentTransformFromGraphicsLayer = false; 302 m_currentTransform.setLocalTransform(matrix); 303 } 304 305 void TextureMapperLayer::setAnimatedOpacity(float opacity) 306 { 307 m_shouldUpdateCurrentOpacityFromGraphicsLayer = false; 308 m_currentOpacity = opacity; 309 } 310 311 #if ENABLE(CSS_FILTERS) 312 void TextureMapperLayer::setAnimatedFilters(const FilterOperations& filters) 313 { 314 m_shouldUpdateCurrentFiltersFromGraphicsLayer = false; 315 m_currentFilters = filters; 316 } 317 300 318 static bool shouldKeepContentTexture(const FilterOperations& filters) 301 319 { … … 408 426 if (changeMask & AnimationChange) 409 427 m_animations = graphicsLayer->m_animations; 428 429 if (changeMask & TransformChange) 430 m_shouldUpdateCurrentTransformFromGraphicsLayer = true; 431 432 if (changeMask & OpacityChange) 433 m_shouldUpdateCurrentOpacityFromGraphicsLayer = true; 434 435 #if ENABLE(CSS_FILTERS) 436 if (changeMask & FilterChange) 437 m_shouldUpdateCurrentFiltersFromGraphicsLayer = true; 438 #endif 410 439 411 440 if (changeMask & RepaintCountChange) … … 445 474 m_currentTransform.setSize(m_state.size); 446 475 m_currentTransform.setFlattening(!m_state.preserves3D); 447 m_currentTransform.setLocalTransform(m_state.transform);448 476 m_currentTransform.setChildrenTransform(m_state.childrenTransform); 449 477 … … 520 548 { 521 549 m_animations.apply(this); 522 if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform)) 523 setAnimatedTransform(m_state.transform); 524 if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity)) 525 setAnimatedOpacity(m_state.opacity); 526 #if ENABLE(CSS_FILTERS) 527 if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitFilter)) 528 setAnimatedFilters(m_state.filters); 550 if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform) && m_shouldUpdateCurrentTransformFromGraphicsLayer) 551 m_currentTransform.setLocalTransform(m_state.transform); 552 if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity) && m_shouldUpdateCurrentOpacityFromGraphicsLayer) 553 m_currentOpacity = m_state.opacity; 554 555 #if ENABLE(CSS_FILTERS) 556 if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitFilter) && m_shouldUpdateCurrentFiltersFromGraphicsLayer) 557 m_currentFilters = m_state.filters; 529 558 #endif 530 559 } -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
r140821 r140825 84 84 , m_currentOpacity(1) 85 85 , m_centerZ(0) 86 , m_shouldUpdateCurrentTransformFromGraphicsLayer(true) 87 , m_shouldUpdateCurrentOpacityFromGraphicsLayer(true) 88 #if ENABLE(CSS_FILTERS) 89 , m_shouldUpdateCurrentFiltersFromGraphicsLayer(true) 90 #endif 86 91 , m_textureMapper(0) 87 92 { } … … 128 133 129 134 // GraphicsLayerAnimation::Client 130 virtual void setAnimatedTransform(const TransformationMatrix& matrix) OVERRIDE { m_currentTransform.setLocalTransform(matrix); }131 virtual void setAnimatedOpacity(float opacity) OVERRIDE { m_currentOpacity = opacity; }132 #if ENABLE(CSS_FILTERS) 133 virtual void setAnimatedFilters(const FilterOperations& filters) OVERRIDE { m_currentFilters = filters; }135 virtual void setAnimatedTransform(const TransformationMatrix&) OVERRIDE; 136 virtual void setAnimatedOpacity(float) OVERRIDE; 137 #if ENABLE(CSS_FILTERS) 138 virtual void setAnimatedFilters(const FilterOperations&) OVERRIDE; 134 139 #endif 135 140 … … 161 166 #endif 162 167 float m_centerZ; 168 169 bool m_shouldUpdateCurrentTransformFromGraphicsLayer; 170 bool m_shouldUpdateCurrentOpacityFromGraphicsLayer; 171 #if ENABLE(CSS_FILTERS) 172 bool m_shouldUpdateCurrentFiltersFromGraphicsLayer; 173 #endif 163 174 164 175 struct State {
Note: See TracChangeset
for help on using the changeset viewer.