Changeset 55967 in webkit


Ignore:
Timestamp:
Mar 13, 2010 11:28:45 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-13 Kim Grönholm <kim.gronholm@nomovok.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] GraphicsLayer: Opacity change from zero to non-zero doesn't always have effect with AC
https://bugs.webkit.org/show_bug.cgi?id=36034

  • platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::OpacityAnimationQt::applyFrame):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55966 r55967  
     12010-03-13  Kim Grönholm  <kim.gronholm@nomovok.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] GraphicsLayer: Opacity change from zero to non-zero doesn't always have effect with AC
     6        https://bugs.webkit.org/show_bug.cgi?id=36034
     7
     8        * platform/graphics/qt/GraphicsLayerQt.cpp:
     9        (WebCore::OpacityAnimationQt::applyFrame):
     10
    1112010-03-13  Kim Grönholm  <kim.gronholm@nomovok.com>
    212
  • trunk/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp

    r55966 r55967  
    11351135    virtual void applyFrame(const qreal& fromValue, const qreal& toValue, qreal progress)
    11361136    {
    1137         m_layer.data()->setOpacity(qMin<qreal>(qMax<qreal>(fromValue + (toValue-fromValue)*progress, 0), 1));
     1137        qreal opacity = qBound(qreal(0), fromValue + (toValue-fromValue)*progress, qreal(1));
     1138
     1139        // FIXME: this is a hack, due to a probable QGraphicsScene bug.
     1140        // Without this the opacity change doesn't always have immediate effect.
     1141        if (!m_layer.data()->opacity() && opacity)
     1142            m_layer.data()->scene()->update();
     1143
     1144        m_layer.data()->setOpacity(opacity);
    11381145    }
    11391146
Note: See TracChangeset for help on using the changeset viewer.