Changeset 144183 in webkit


Ignore:
Timestamp:
Feb 27, 2013 7:27:21 AM (11 years ago)
Author:
allan.jensen@digia.com
Message:

[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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r144182 r144183  
     12013-02-27  Allan Sandfeld Jensen  <allan.jensen@digia.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        Notify about animation start after the new animation is actually commited.
     9
     10        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
     11        (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
     12        (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
     13        (WebCore::GraphicsLayerTextureMapper::addAnimation):
     14        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
     15        (GraphicsLayerTextureMapper):
     16
    1172013-02-27  Vivek Galatage  <vivek.vg@samsung.com>
    218
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp

    r144078 r144183  
    5757    , m_debugBorderWidth(0)
    5858    , m_contentsLayer(0)
    59     , m_animationStartedTimer(this, &GraphicsLayerTextureMapper::animationStartedTimerFired)
     59    , m_animationStartTime(0)
    6060{
    6161}
     
    538538        m_layer->setAnimations(m_animations);
    539539
     540    if (m_changeMask & AnimationStarted)
     541        client()->notifyAnimationStarted(this, m_animationStartTime);
     542
    540543    if (m_changeMask & FixedToViewporChange)
    541544        m_layer->setFixedToViewport(fixedToViewport());
     
    611614        listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0;
    612615
    613     m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, WTF::currentTime() - timeOffset, listsMatch));
     616    m_animationStartTime = WTF::currentTime() - timeOffset;
     617    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, m_animationStartTime, listsMatch));
    614618    notifyChange(AnimationChange);
    615     m_animationStartedTimer.startOneShot(0);
     619    notifyChange(AnimationStarted);
    616620    return true;
    617621}
     
    634638}
    635639
    636 void GraphicsLayerTextureMapper::animationStartedTimerFired(Timer<GraphicsLayerTextureMapper>*)
    637 {
    638     client()->notifyAnimationStarted(this, /* DOM time */ WTF::currentTime());
    639 }
    640 
    641640#if ENABLE(CSS_FILTERS)
    642641bool GraphicsLayerTextureMapper::setFilters(const FilterOperations& filters)
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h

    r142366 r144183  
    105105    void prepareBackingStoreIfNeeded();
    106106    bool shouldHaveBackingStore() const;
    107     void animationStartedTimerFired(Timer<GraphicsLayerTextureMapper>*);
    108107
    109108    // This set of flags help us defer which properties of the layer have been
     
    144143        RepaintCountChange =        (1L << 25),
    145144
    146         FixedToViewporChange =      (1L << 26)
     145        FixedToViewporChange =      (1L << 26),
     146        AnimationStarted =          (1L << 27)
    147147    };
    148148    void notifyChange(ChangeMask);
     
    165165    FloatRect m_needsDisplayRect;
    166166    GraphicsLayerAnimations m_animations;
    167     Timer<GraphicsLayerTextureMapper> m_animationStartedTimer;
     167    double m_animationStartTime;
    168168};
    169169
Note: See TracChangeset for help on using the changeset viewer.