Changeset 132275 in webkit


Ignore:
Timestamp:
Oct 23, 2012 3:19:37 PM (12 years ago)
Author:
noam.rosenthal@nokia.com
Message:

Coordinated Graphics: Enable threaded/IPC animations
https://bugs.webkit.org/show_bug.cgi?id=93146

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Add enablers to TextureMapper and GraphicsLayerAnimation so that they could be used
across processes with IPC. Added some public accessors to GraphicsLayerAnimation,
and allowed a GraphicsLayerTextureMapper to receive a full list of animations.

Covered by existing animation and compositing tests.

  • platform/graphics/GraphicsLayerAnimation.cpp:

(WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):

Initialize the animation with the startTime instead of the offset.

(WebCore::GraphicsLayerAnimations::getActiveAnimations):

  • platform/graphics/GraphicsLayerAnimation.h:

(WebCore::GraphicsLayerAnimation::setState):

Allow setting the pause time as well.

(WebCore::GraphicsLayerAnimation::boxSize):
(WebCore::GraphicsLayerAnimation::startTime):
(WebCore::GraphicsLayerAnimation::pauseTime):
(WebCore::GraphicsLayerAnimation::animation):
(WebCore::GraphicsLayerAnimation::keyframes):
(WebCore::GraphicsLayerAnimation::listsMatch):
(WebCore::GraphicsLayerAnimations::size):
(WebCore::GraphicsLayerAnimations::animations):

Add public accessors to GraphicsLayerAnimation properties.

(GraphicsLayerAnimation):
(GraphicsLayerAnimations):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::addAnimation):
(WebCore::GraphicsLayerTextureMapper::setAnimations):

Allow replacing the entire list of animations.

(WebCore):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:

(GraphicsLayerTextureMapper):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::applyAnimationsRecursively):
(WebCore):

  • platform/graphics/texmap/TextureMapperLayer.h:

(TextureMapperLayer):

Source/WebKit2:

Re-enable UI-process animations for Coordinated-Graphics/TextureMapper.

  • Added an argument coder for GraphicsLayerAnimations.
  • Allow LayerTreeCoordinator to manage the animations per layer with the proxy, as opposed to applying the animation values in the web process as before.
  • LayerTreeRenderer now calls updateViewport() after painting when an animation is active.

To overcome the problem we've had in the past with synchronizing UI-side and web-side
animations, we now lock the animations in the UI process when a frame starts rendering,
and unlock it when the frame finishes rendering, or if after the layout there is no visible
changes pending on the screen.

  • Scripts/webkit2/messages.py:

(headers_for_type):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:

(CoreIPC):
(CoreIPC::encodeTimingFunction):
(CoreIPC::decodeTimingFunction):
(CoreIPC::::encode):
(CoreIPC::::decode):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:

(WebCore):

Added argument coders for GraphicsLayerAnimations.

  • UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:

(WebKit::LayerTreeCoordinatorProxy::setLayerAnimations):
(WebKit::LayerTreeCoordinatorProxy::setAnimationsLocked):

  • UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:

(LayerTreeCoordinatorProxy):

  • UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:

Added an option to sync the layer's animations, and also to lock/unlock animations.

  • UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:

(WebKit::LayerTreeRenderer::LayerTreeRenderer):
(WebKit::LayerTreeRenderer::paintToCurrentGLContext):

Sync animations if they're not locked, and call updateViewport() if we have animations.

(WebKit::LayerTreeRenderer::flushLayerChanges):
(WebKit::LayerTreeRenderer::setLayerAnimations):
(WebKit::LayerTreeRenderer::setAnimationsLocked):

  • UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:

(LayerTreeRenderer):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::didChangeAnimations):
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::syncAnimations):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::addAnimation):
(WebCore::CoordinatedGraphicsLayer::pauseAnimation):
(WebCore::CoordinatedGraphicsLayer::removeAnimation):
(WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
(WebCore):

Pass the animation info to the UI process instead of applying it in the web process.

(WebCore::CoordinatedGraphicsLayer::hasPendingVisibleChanges):

Compute whether a layer tree might have sync issues or flickers if rendered while
background animations are ongoing.

(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):

Don't allow progressive tiling for layers with animations.

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:

(WebCore):
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:

(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::lockAnimations):
(WebKit):
(WebKit::LayerTreeCoordinator::unlockAnimations):
(WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
(WebKit::LayerTreeCoordinator::setLayerAnimations):

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:

(LayerTreeCoordinator):

Location:
trunk/Source
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r132274 r132275  
     12012-10-23  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        Coordinated Graphics: Enable threaded/IPC animations
     4        https://bugs.webkit.org/show_bug.cgi?id=93146
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add enablers to TextureMapper and GraphicsLayerAnimation so that they could be used
     9        across processes with IPC. Added some public accessors to GraphicsLayerAnimation,
     10        and allowed a GraphicsLayerTextureMapper to receive a full list of animations.
     11
     12        Covered by existing animation and compositing tests.
     13
     14        * platform/graphics/GraphicsLayerAnimation.cpp:
     15        (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
     16            Initialize the animation with the startTime instead of the offset.
     17
     18        (WebCore::GraphicsLayerAnimations::getActiveAnimations):
     19        * platform/graphics/GraphicsLayerAnimation.h:
     20        (WebCore::GraphicsLayerAnimation::setState):
     21            Allow setting the pause time as well.
     22
     23        (WebCore::GraphicsLayerAnimation::boxSize):
     24        (WebCore::GraphicsLayerAnimation::startTime):
     25        (WebCore::GraphicsLayerAnimation::pauseTime):
     26        (WebCore::GraphicsLayerAnimation::animation):
     27        (WebCore::GraphicsLayerAnimation::keyframes):
     28        (WebCore::GraphicsLayerAnimation::listsMatch):
     29        (WebCore::GraphicsLayerAnimations::size):
     30        (WebCore::GraphicsLayerAnimations::animations):
     31            Add public accessors to GraphicsLayerAnimation properties.
     32
     33        (GraphicsLayerAnimation):
     34        (GraphicsLayerAnimations):
     35        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
     36        (WebCore::GraphicsLayerTextureMapper::addAnimation):
     37        (WebCore::GraphicsLayerTextureMapper::setAnimations):
     38            Allow replacing the entire list of animations.
     39
     40        (WebCore):
     41        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
     42        (GraphicsLayerTextureMapper):
     43        * platform/graphics/texmap/TextureMapperLayer.cpp:
     44        (WebCore::TextureMapperLayer::applyAnimationsRecursively):
     45        (WebCore):
     46        * platform/graphics/texmap/TextureMapperLayer.h:
     47        (TextureMapperLayer):
     48
    1492012-10-23  Chris Rogers  <crogers@google.com>
    250
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp

    r127072 r132275  
    157157
    158158
    159 GraphicsLayerAnimation::GraphicsLayerAnimation(const String& name, const KeyframeValueList& keyframes, const IntSize& boxSize, const Animation* animation, double timeOffset, bool listsMatch)
     159GraphicsLayerAnimation::GraphicsLayerAnimation(const String& name, const KeyframeValueList& keyframes, const IntSize& boxSize, const Animation* animation, double startTime, bool listsMatch)
    160160    : m_keyframes(keyframes)
    161161    , m_boxSize(boxSize)
     
    163163    , m_name(name)
    164164    , m_listsMatch(listsMatch)
    165     , m_startTime(WTF::currentTime() - timeOffset)
     165    , m_startTime(startTime)
    166166    , m_pauseTime(0)
    167167    , m_state(PlayingState)
     
    286286}
    287287
     288GraphicsLayerAnimations GraphicsLayerAnimations::getActiveAnimations() const
     289{
     290    GraphicsLayerAnimations active;
     291    for (size_t i = 0; i < m_animations.size(); ++i) {
     292        if (m_animations[i].isActive())
     293            active.add(m_animations[i]);
     294    }
     295    return active;
     296}
    288297}
    289298#endif
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerAnimation.h

    r124908 r132275  
    4646    void pause(double);
    4747    AnimationState state() const { return m_state; }
    48     void setState(AnimationState s) { m_state = s; }
     48    void setState(AnimationState s, double pauseTime = 0)
     49    {
     50        m_state = s;
     51        m_pauseTime = pauseTime;
     52    }
    4953    AnimatedPropertyID property() const { return m_keyframes.property(); }
    5054    bool isActive() const;
    5155    String name() const { return m_name; }
     56    IntSize boxSize() const { return m_boxSize; }
     57    double startTime() const { return m_startTime; }
     58    double pauseTime() const { return m_pauseTime; }
     59    PassRefPtr<Animation> animation() const { return m_animation.get(); }
     60    const KeyframeValueList& keyframes() const { return m_keyframes; }
     61    bool listsMatch() const { return m_listsMatch; }
    5262
    5363private:
     
    5868    String m_name;
    5969    bool m_listsMatch;
    60     bool m_hasBigRotation;
    6170    double m_startTime;
    6271    double m_pauseTime;
     
    7382    void apply(GraphicsLayerAnimation::Client*);
    7483    bool isEmpty() const { return m_animations.isEmpty(); }
     84    size_t size() const { return m_animations.size(); }
     85    const Vector<GraphicsLayerAnimation>& animations() const { return m_animations; }
     86    Vector<GraphicsLayerAnimation>& animations() { return m_animations; }
    7587
    7688    bool hasRunningAnimations() const;
    7789    bool hasActiveAnimationsOfType(AnimatedPropertyID type) const;
     90
     91    GraphicsLayerAnimations getActiveAnimations() const;
    7892
    7993private:
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp

    r130439 r132275  
    2121#include "GraphicsLayerTextureMapper.h"
    2222
     23#include "GraphicsLayerAnimation.h"
    2324#include "GraphicsLayerFactory.h"
    2425#include "TextureMapperLayer.h"
     
    393394        listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0;
    394395
    395     m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, timeOffset, listsMatch));
     396    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, WTF::currentTime() - timeOffset, listsMatch));
    396397    notifyChange(TextureMapperLayer::AnimationChange);
    397398    m_animationStartedTimer.startOneShot(0);
     
    399400}
    400401
     402void GraphicsLayerTextureMapper::setAnimations(const GraphicsLayerAnimations& animations)
     403{
     404    m_animations = animations;
     405    notifyChange(TextureMapperLayer::AnimationChange);
     406}
     407
     408
    401409void GraphicsLayerTextureMapper::pauseAnimation(const String& animationName, double timeOffset)
    402410{
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h

    r130439 r132275  
    8282    virtual void pauseAnimation(const String&, double);
    8383    virtual void removeAnimation(const String&);
     84    void setAnimations(const GraphicsLayerAnimations&);
    8485
    8586    TextureMapperLayer* layer() const { return m_layer.get(); }
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

    r132019 r132275  
    511511}
    512512
     513void TextureMapperLayer::applyAnimationsRecursively()
     514{
     515    syncAnimations();
     516    for (size_t i = 0; i < m_children.size(); ++i)
     517        m_children[i]->applyAnimationsRecursively();
     518}
     519
    513520void TextureMapperLayer::syncAnimations()
    514521{
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h

    r130439 r132275  
    133133
    134134    void setDebugBorder(const Color&, float width);
     135    void applyAnimationsRecursively();
    135136
    136137private:
  • trunk/Source/WebKit2/ChangeLog

    r132235 r132275  
     12012-10-23  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        Coordinated Graphics: Enable threaded/IPC animations
     4        https://bugs.webkit.org/show_bug.cgi?id=93146
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Re-enable UI-process animations for Coordinated-Graphics/TextureMapper.
     9        - Added an argument coder for GraphicsLayerAnimations.
     10        - Allow LayerTreeCoordinator to manage the animations per layer with the proxy,
     11          as opposed to applying the animation values in the web process as before.
     12        - LayerTreeRenderer now calls updateViewport() after painting when an animation is active.
     13
     14        To overcome the problem we've had in the past with synchronizing UI-side and web-side
     15        animations, we now lock the animations in the UI process when a frame starts rendering,
     16        and unlock it when the frame finishes rendering, or if after the layout there is no visible
     17        changes pending on the screen.
     18
     19        * Scripts/webkit2/messages.py:
     20        (headers_for_type):
     21        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
     22        (CoreIPC):
     23        (CoreIPC::encodeTimingFunction):
     24        (CoreIPC::decodeTimingFunction):
     25        (CoreIPC::::encode):
     26        (CoreIPC::::decode):
     27        * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
     28        (WebCore):
     29            Added argument coders for GraphicsLayerAnimations.
     30
     31        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
     32        (WebKit::LayerTreeCoordinatorProxy::setLayerAnimations):
     33        (WebKit::LayerTreeCoordinatorProxy::setAnimationsLocked):
     34        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
     35        (LayerTreeCoordinatorProxy):
     36        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
     37            Added an option to sync the layer's animations, and also to lock/unlock animations.
     38
     39        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
     40        (WebKit::LayerTreeRenderer::LayerTreeRenderer):
     41        (WebKit::LayerTreeRenderer::paintToCurrentGLContext):
     42            Sync animations if they're not locked, and call updateViewport() if we have animations.
     43
     44        (WebKit::LayerTreeRenderer::flushLayerChanges):
     45        (WebKit::LayerTreeRenderer::setLayerAnimations):
     46        (WebKit::LayerTreeRenderer::setAnimationsLocked):
     47
     48        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
     49        (LayerTreeRenderer):
     50        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
     51        (WebCore::CoordinatedGraphicsLayer::didChangeAnimations):
     52        (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
     53        (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
     54        (WebCore::CoordinatedGraphicsLayer::syncLayerState):
     55        (WebCore::CoordinatedGraphicsLayer::syncAnimations):
     56        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
     57        (WebCore::CoordinatedGraphicsLayer::addAnimation):
     58        (WebCore::CoordinatedGraphicsLayer::pauseAnimation):
     59        (WebCore::CoordinatedGraphicsLayer::removeAnimation):
     60        (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
     61        (WebCore):
     62            Pass the animation info to the UI process instead of applying it in the web process.
     63
     64        (WebCore::CoordinatedGraphicsLayer::hasPendingVisibleChanges):
     65            Compute whether a layer tree might have sync issues or flickers if rendered while
     66            background animations are ongoing.
     67
     68        (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
     69        (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
     70            Don't allow progressive tiling for layers with animations.
     71
     72        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
     73        (WebCore):
     74        (CoordinatedGraphicsLayerClient):
     75        (CoordinatedGraphicsLayer):
     76        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
     77        (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
     78        (WebKit::LayerTreeCoordinator::lockAnimations):
     79        (WebKit):
     80        (WebKit::LayerTreeCoordinator::unlockAnimations):
     81        (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
     82        (WebKit::LayerTreeCoordinator::setLayerAnimations):
     83        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
     84        (LayerTreeCoordinator):
     85
    1862012-10-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    287
  • trunk/Source/WebKit2/Scripts/webkit2/messages.py

    r132085 r132275  
    388388        'WebCore::CompositionUnderline': ['<WebCore/Editor.h>'],
    389389        'WebCore::GrammarDetail': ['<WebCore/TextCheckerClient.h>'],
     390        'WebCore::GraphicsLayerAnimations': ['<WebCore/GraphicsLayerAnimation.h>'],
    390391        'WebCore::KeyframeValueList': ['<WebCore/GraphicsLayer.h>'],
    391392        'WebCore::KeypressCommand': ['<WebCore/KeyboardEvent.h>'],
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp

    r131990 r132275  
    3434#include <WebCore/Color.h>
    3535#include <WebCore/FloatPoint3D.h>
     36#include <WebCore/GraphicsLayerAnimation.h>
     37#include <WebCore/IdentityTransformOperation.h>
    3638#include <WebCore/IntPoint.h>
    3739#include <WebCore/Length.h>
     40#include <WebCore/Matrix3DTransformOperation.h>
     41#include <WebCore/MatrixTransformOperation.h>
     42#include <WebCore/PerspectiveTransformOperation.h>
     43#include <WebCore/RotateTransformOperation.h>
     44#include <WebCore/ScaleTransformOperation.h>
     45#include <WebCore/SkewTransformOperation.h>
     46#include <WebCore/TimingFunction.h>
    3847#include <WebCore/TransformationMatrix.h>
     48#include <WebCore/TranslateTransformOperation.h>
    3949
    4050#if ENABLE(CSS_FILTERS)
     
    4959#include <WebCore/CustomFilterProgram.h>
    5060#include <WebCore/CustomFilterTransformParameter.h>
    51 #include <WebCore/IdentityTransformOperation.h>
    52 #include <WebCore/Matrix3DTransformOperation.h>
    53 #include <WebCore/MatrixTransformOperation.h>
    54 #include <WebCore/PerspectiveTransformOperation.h>
    55 #include <WebCore/RotateTransformOperation.h>
    56 #include <WebCore/ScaleTransformOperation.h>
    57 #include <WebCore/SkewTransformOperation.h>
    58 #include <WebCore/TranslateTransformOperation.h>
    59 #endif
     61#endif
     62
    6063
    6164#if USE(GRAPHICS_SURFACE)
     
    345348#endif
    346349
    347 #if ENABLE(CSS_SHADERS)
    348350void ArgumentCoder<TransformOperations>::encode(ArgumentEncoder* encoder, const TransformOperations& transformOperations)
    349351{
     
    505507    return true;
    506508}
    507 #endif
     509
     510static void encodeTimingFunction(ArgumentEncoder* encoder, const TimingFunction* timingFunction)
     511{
     512    if (!timingFunction) {
     513        encoder->encodeEnum(TimingFunction::TimingFunctionType(-1));
     514        return;
     515    }
     516
     517    TimingFunction::TimingFunctionType type = timingFunction ? timingFunction->type() : TimingFunction::LinearFunction;
     518    encoder->encodeEnum(type);
     519    switch (type) {
     520    case TimingFunction::LinearFunction:
     521        break;
     522    case TimingFunction::CubicBezierFunction: {
     523        const CubicBezierTimingFunction* cubic = static_cast<const CubicBezierTimingFunction*>(timingFunction);
     524        encoder->encodeDouble(cubic->x1());
     525        encoder->encodeDouble(cubic->y1());
     526        encoder->encodeDouble(cubic->x2());
     527        encoder->encodeDouble(cubic->y2());
     528        break;
     529    }
     530    case TimingFunction::StepsFunction: {
     531        const StepsTimingFunction* steps = static_cast<const StepsTimingFunction*>(timingFunction);
     532        encoder->encodeInt32(steps->numberOfSteps());
     533        encoder->encodeBool(steps->stepAtStart());
     534        break;
     535    }
     536    }
     537}
     538
     539bool decodeTimingFunction(ArgumentDecoder* decoder, RefPtr<TimingFunction>& timingFunction)
     540{
     541    TimingFunction::TimingFunctionType type;
     542    if (!decoder->decodeEnum(type))
     543        return false;
     544
     545    if (type == TimingFunction::TimingFunctionType(-1))
     546        return true;
     547
     548    switch (type) {
     549    case TimingFunction::LinearFunction:
     550        timingFunction = LinearTimingFunction::create();
     551        return true;
     552    case TimingFunction::CubicBezierFunction: {
     553        double x1, y1, x2, y2;
     554        if (!decoder->decodeDouble(x1))
     555            return false;
     556        if (!decoder->decodeDouble(y1))
     557            return false;
     558        if (!decoder->decodeDouble(x2))
     559            return false;
     560        if (!decoder->decodeDouble(y2))
     561            return false;
     562
     563        timingFunction = CubicBezierTimingFunction::create(x1, y1, x2, y2);
     564        return true;
     565    }
     566    case TimingFunction::StepsFunction: {
     567        int numberOfSteps;
     568        bool stepAtStart;
     569        if (!decoder->decodeInt32(numberOfSteps))
     570            return false;
     571        if (!decoder->decodeBool(stepAtStart))
     572            return false;
     573
     574        timingFunction = StepsTimingFunction::create(numberOfSteps, stepAtStart);
     575        return true;
     576    }
     577    }
     578
     579    return false;
     580}
     581
     582void ArgumentCoder<GraphicsLayerAnimation>::encode(ArgumentEncoder* encoder, const GraphicsLayerAnimation& animation)
     583{
     584    encoder->encode(animation.name());
     585    encoder->encode(animation.boxSize());
     586    encoder->encodeEnum(animation.state());
     587    encoder->encodeDouble(animation.startTime());
     588    encoder->encodeDouble(animation.pauseTime());
     589    encoder->encodeBool(animation.listsMatch());
     590
     591    RefPtr<Animation> animationObject = animation.animation();
     592    encoder->encodeEnum(animationObject->direction());
     593    encoder->encodeUInt32(animationObject->fillMode());
     594    encoder->encodeDouble(animationObject->duration());
     595    encoder->encodeDouble(animationObject->iterationCount());
     596    encodeTimingFunction(encoder, animationObject->timingFunction().get());
     597
     598    const KeyframeValueList& keyframes = animation.keyframes();
     599    encoder->encodeEnum(keyframes.property());
     600    encoder->encodeUInt32(keyframes.size());
     601    for (size_t i = 0; i < keyframes.size(); ++i) {
     602        const AnimationValue* value = keyframes.at(i);
     603        encoder->encodeFloat(value->keyTime());
     604        encodeTimingFunction(encoder, value->timingFunction());
     605        switch (keyframes.property()) {
     606        case AnimatedPropertyOpacity:
     607            encoder->encodeFloat(static_cast<const FloatAnimationValue*>(value)->value());
     608            break;
     609        case AnimatedPropertyWebkitTransform:
     610            encoder->encode(*static_cast<const TransformAnimationValue*>(value)->value());
     611            break;
     612        default:
     613            break;
     614        }
     615    }
     616}
     617
     618bool ArgumentCoder<GraphicsLayerAnimation>::decode(ArgumentDecoder* decoder, GraphicsLayerAnimation& animation)
     619{
     620    String name;
     621    IntSize boxSize;
     622    GraphicsLayerAnimation::AnimationState state;
     623    double startTime;
     624    double pauseTime;
     625    bool listsMatch;
     626
     627    Animation::AnimationDirection direction;
     628    unsigned fillMode;
     629    double duration;
     630    double iterationCount;
     631    RefPtr<TimingFunction> timingFunction;
     632    RefPtr<Animation> animationObject;
     633
     634    if (!decoder->decode(name))
     635        return false;
     636    if (!decoder->decode(boxSize))
     637        return false;
     638    if (!decoder->decodeEnum(state))
     639        return false;
     640    if (!decoder->decodeDouble(startTime))
     641        return false;
     642    if (!decoder->decodeDouble(pauseTime))
     643        return false;
     644    if (!decoder->decodeBool(listsMatch))
     645        return false;
     646    if (!decoder->decodeEnum(direction))
     647        return false;
     648    if (!decoder->decodeUInt32(fillMode))
     649        return false;
     650    if (!decoder->decodeDouble(duration))
     651        return false;
     652    if (!decoder->decodeDouble(iterationCount))
     653        return false;
     654    if (!decodeTimingFunction(decoder, timingFunction))
     655        return false;
     656
     657    animationObject = Animation::create();
     658    animationObject->setDirection(direction);
     659    animationObject->setFillMode(fillMode);
     660    animationObject->setDuration(duration);
     661    animationObject->setIterationCount(iterationCount);
     662    if (timingFunction)
     663        animationObject->setTimingFunction(timingFunction);
     664
     665    AnimatedPropertyID property;
     666    if (!decoder->decodeEnum(property))
     667        return false;
     668    KeyframeValueList keyframes(property);
     669    unsigned keyframesSize;
     670    if (!decoder->decodeUInt32(keyframesSize))
     671        return false;
     672    for (unsigned i = 0; i < keyframesSize; ++i) {
     673        float keyTime;
     674        RefPtr<TimingFunction> timingFunction;
     675        if (!decoder->decode(keyTime))
     676            return false;
     677        if (!decodeTimingFunction(decoder, timingFunction))
     678            return false;
     679
     680        switch (property) {
     681        case AnimatedPropertyOpacity: {
     682            float value;
     683            if (!decoder->decodeFloat(value))
     684                return false;
     685            keyframes.insert(new FloatAnimationValue(keyTime, value, timingFunction));
     686            break;
     687        }
     688        case AnimatedPropertyWebkitTransform: {
     689            TransformOperations transform;
     690            if (!decoder->decode(transform))
     691                return false;
     692            keyframes.insert(new TransformAnimationValue(keyTime, &transform, timingFunction));
     693            break;
     694        }
     695        default:
     696            break;
     697        }
     698    }
     699
     700    animation = GraphicsLayerAnimation(name, keyframes, boxSize, animationObject.get(), startTime, listsMatch);
     701    animation.setState(state, pauseTime);
     702
     703    return true;
     704}
     705
     706void ArgumentCoder<GraphicsLayerAnimations>::encode(ArgumentEncoder* encoder, const GraphicsLayerAnimations& animations)
     707{
     708    encoder->encode(animations.animations());
     709}
     710
     711bool ArgumentCoder<GraphicsLayerAnimations>::decode(ArgumentDecoder* decoder, GraphicsLayerAnimations& animations)
     712{
     713    return decoder->decode(animations.animations());
     714}
    508715
    509716#if USE(GRAPHICS_SURFACE)
  • trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h

    r131741 r132275  
    3434namespace WebCore {
    3535class FloatPoint3D;
     36class GraphicsLayerAnimation;
     37class GraphicsLayerAnimations;
    3638class TransformationMatrix;
    3739struct Length;
     
    7476#endif
    7577
    76 #if ENABLE(CSS_SHADERS)
    7778template<> struct ArgumentCoder<WebCore::TransformOperations> {
    7879    static void encode(ArgumentEncoder*, const WebCore::TransformOperations&);
    7980    static bool decode(ArgumentDecoder*, WebCore::TransformOperations&);
    8081};
    81 #endif
     82
     83template<> struct ArgumentCoder<WebCore::GraphicsLayerAnimations> {
     84    static void encode(ArgumentEncoder*, const WebCore::GraphicsLayerAnimations&);
     85    static bool decode(ArgumentDecoder*, WebCore::GraphicsLayerAnimations&);
     86};
     87
     88template<> struct ArgumentCoder<WebCore::GraphicsLayerAnimation> {
     89    static void encode(ArgumentEncoder*, const WebCore::GraphicsLayerAnimation&);
     90    static bool decode(ArgumentDecoder*, WebCore::GraphicsLayerAnimation&);
     91};
    8292
    8393#if USE(GRAPHICS_SURFACE)
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp

    r132228 r132275  
    145145}
    146146
    147 void LayerTreeCoordinatorProxy::setLayerAnimatedOpacity(uint32_t id, float opacity)
     147void LayerTreeCoordinatorProxy::setLayerAnimations(WebLayerID id, const GraphicsLayerAnimations& animations)
    148148{
    149     dispatchUpdate(bind(&LayerTreeRenderer::setAnimatedOpacity, m_renderer.get(), id, opacity));
     149    dispatchUpdate(bind(&LayerTreeRenderer::setLayerAnimations, m_renderer.get(), id, animations));
    150150}
    151151
    152 void LayerTreeCoordinatorProxy::setLayerAnimatedTransform(uint32_t id, const WebCore::TransformationMatrix& transform)
     152void LayerTreeCoordinatorProxy::setAnimationsLocked(bool locked)
    153153{
    154     dispatchUpdate(bind(&LayerTreeRenderer::setAnimatedTransform, m_renderer.get(), id, transform));
     154    dispatchUpdate(bind(&LayerTreeRenderer::setAnimationsLocked, m_renderer.get(), locked));
    155155}
    156156
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h

    r131807 r132275  
    3131#include <WebCore/GraphicsContext.h>
    3232#include <WebCore/GraphicsLayer.h>
     33#include <WebCore/GraphicsLayerAnimation.h>
    3334#include <WebCore/GraphicsSurfaceToken.h>
    3435#include <WebCore/IntRect.h>
     
    8182    void purgeBackingStores();
    8283    LayerTreeRenderer* layerTreeRenderer() const { return m_renderer.get(); }
    83     void setLayerAnimatedOpacity(uint32_t, float);
    84     void setLayerAnimatedTransform(uint32_t, const WebCore::TransformationMatrix&);
     84    void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
     85    void setAnimationsLocked(bool);
    8586
    8687protected:
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in

    r131036 r132275  
    3434    DidRenderFrame(WebCore::IntSize contentsSize, WebCore::IntRect coveredRect)
    3535    DidChangeScrollPosition(WebCore::IntPoint position)
     36    SetLayerAnimations(uint32_t id, WebCore::GraphicsLayerAnimations animations)
     37    SetAnimationsLocked(bool locked)
     38
    3639#if USE(GRAPHICS_SURFACE)
    3740    SyncCanvas(uint32_t id, WebCore::IntSize canvasSize, WebCore::GraphicsSurfaceToken token, uint32_t frontBuffer)
    3841#endif
    39     SetLayerAnimatedOpacity(uint32_t id, float opacity)
    40     SetLayerAnimatedTransform(uint32_t id, WebCore::TransformationMatrix transform)
    4142}
    4243#endif
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp

    r132019 r132275  
    8989    , m_rootLayerID(InvalidWebLayerID)
    9090    , m_isActive(false)
     91    , m_animationsLocked(false)
    9192{
    9293}
     
    121122
    122123    layer->setTextureMapper(m_textureMapper.get());
     124    if (!m_animationsLocked)
     125        layer->applyAnimationsRecursively();
    123126    m_textureMapper->beginPainting(PaintFlags);
    124127    m_textureMapper->beginClip(TransformationMatrix(), clipRect);
     
    133136    m_textureMapper->endClip();
    134137    m_textureMapper->endPainting();
     138
     139    if (layer->descendantsOrSelfHaveRunningAnimations())
     140        dispatchOnMainThread(bind(&LayerTreeRenderer::updateViewport, this));
    135141}
    136142
     
    394400    m_renderedContentsScrollPosition = m_pendingRenderedContentsScrollPosition;
    395401
     402    // Since the frame has now been rendered, we can safely unlock the animations until the next layout.
     403    setAnimationsLocked(false);
     404
    396405    m_rootLayer->flushCompositingState(FloatRect());
    397406    commitTileOperations();
     
    462471}
    463472
    464 void LayerTreeRenderer::setAnimatedOpacity(uint32_t id, float opacity)
    465 {
    466     GraphicsLayer* layer = layerByID(id);
    467     ASSERT(layer);
    468 
    469     layer->setOpacity(opacity);
    470 }
    471 
    472 void LayerTreeRenderer::setAnimatedTransform(uint32_t id, const WebCore::TransformationMatrix& transform)
    473 {
    474     GraphicsLayer* layer = layerByID(id);
    475     ASSERT(layer);
    476 
    477     layer->setTransform(transform);
     473void LayerTreeRenderer::setLayerAnimations(WebLayerID id, const GraphicsLayerAnimations& animations)
     474{
     475    GraphicsLayerTextureMapper* layer = toGraphicsLayerTextureMapper(layerByID(id));
     476    if (!layer)
     477        return;
     478    layer->setAnimations(animations);
     479}
     480
     481void LayerTreeRenderer::setAnimationsLocked(bool locked)
     482{
     483    m_animationsLocked = locked;
    478484}
    479485
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h

    r131036 r132275  
    2929#include <WebCore/GraphicsContext.h>
    3030#include <WebCore/GraphicsLayer.h>
     31#include <WebCore/GraphicsLayerAnimation.h>
    3132#include <WebCore/GraphicsSurface.h>
    3233#include <WebCore/IntRect.h>
     
    9293    void createImage(int64_t, PassRefPtr<ShareableBitmap>);
    9394    void destroyImage(int64_t);
    94     void setAnimatedOpacity(uint32_t, float);
    95     void setAnimatedTransform(uint32_t, const WebCore::TransformationMatrix&);
     95    void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
     96    void setAnimationsLocked(bool);
    9697
    9798private:
     
    148149    WebCore::IntPoint m_pendingRenderedContentsScrollPosition;
    149150    bool m_isActive;
     151    bool m_animationsLocked;
    150152};
    151153
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp

    r131617 r132275  
    6969}
    7070
    71 void CoordinatedGraphicsLayer::didChangeAnimatedProperties()
    72 {
    73     m_shouldSyncAnimatedProperties = true;
     71void CoordinatedGraphicsLayer::didChangeAnimations()
     72{
     73    m_shouldSyncAnimations = true;
    7474    if (client())
    7575        client()->notifyFlushRequired(this);
     
    9494void CoordinatedGraphicsLayer::setShouldUpdateVisibleRect()
    9595{
    96     if (!transform().isAffine())
    97         return;
    98 
    9996    m_shouldUpdateVisibleRect = true;
    10097    for (size_t i = 0; i < children().size(); ++i)
     
    118115    , m_shouldSyncChildren(true)
    119116    , m_shouldSyncFilters(true)
    120     , m_shouldSyncAnimatedProperties(true)
     117    , m_shouldSyncAnimations(true)
    121118    , m_fixedToViewport(false)
    122119    , m_canvasNeedsDisplay(false)
     
    500497    m_layerInfo.size = size();
    501498    m_layerInfo.transform = transform();
    502     if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))
    503         m_effectiveTransform = transform();
    504     if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity))
    505         m_effectiveOpacity = opacity();
    506499    m_CoordinatedGraphicsLayerClient->syncLayerState(m_id, m_layerInfo);
    507500}
    508501
    509 void CoordinatedGraphicsLayer::syncAnimatedProperties()
    510 {
    511     m_animations.apply(this);
    512     if (!m_shouldSyncAnimatedProperties)
    513         return;
    514 
    515     m_shouldSyncAnimatedProperties = false;
    516     if (m_effectiveOpacity != opacity())
    517         m_CoordinatedGraphicsLayerClient->setLayerAnimatedOpacity(id(), m_effectiveOpacity);
    518     if (m_effectiveTransform != transform())
    519         m_CoordinatedGraphicsLayerClient->setLayerAnimatedTransform(id(), m_effectiveTransform);
    520 }
    521 
     502void CoordinatedGraphicsLayer::syncAnimations()
     503{
     504    if (!m_shouldSyncAnimations)
     505        return;
     506
     507    m_shouldSyncAnimations = false;
     508
     509    m_CoordinatedGraphicsLayerClient->setLayerAnimations(m_id, m_animations);
     510}
    522511
    523512void CoordinatedGraphicsLayer::syncCanvas()
     
    551540    ensureImageBackingStore();
    552541    syncLayerState();
    553     syncAnimatedProperties();
     542    syncAnimations();
    554543    computeTransformedVisibleRect();
    555544    syncChildren();
     
    750739}
    751740
     741bool CoordinatedGraphicsLayer::hasPendingVisibleChanges()
     742{
     743    if (opacity() < 0.01 && !m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity))
     744        return false;
     745
     746    for (size_t i = 0; i < children().size(); ++i) {
     747        if (toCoordinatedGraphicsLayer(children()[i])->hasPendingVisibleChanges())
     748            return true;
     749    }
     750
     751    if (!m_shouldSyncLayerState && !m_shouldSyncChildren && !m_shouldSyncFilters && !m_shouldSyncAnimations && !m_canvasNeedsDisplay)
     752        return false;
     753
     754    return selfOrAncestorHaveNonAffineTransforms() || !tiledBackingStoreVisibleRect().isEmpty();
     755
     756}
     757
    752758void CoordinatedGraphicsLayer::computeTransformedVisibleRect()
    753759{
    754760    if (!m_shouldUpdateVisibleRect)
    755761        return;
     762
    756763    m_shouldUpdateVisibleRect = false;
    757     m_layerTransform.setLocalTransform(m_effectiveTransform);
     764    m_layerTransform.setLocalTransform(transform());
    758765    m_layerTransform.setPosition(position());
    759766    m_layerTransform.setAnchorPoint(anchorPoint());
     
    780787bool CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms()
    781788{
     789    if (m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))
     790        return true;
     791
    782792    if (!m_layerTransform.combined().isAffine())
    783793        return true;
     
    799809        listsMatch = validateTransformOperations(valueList, ignoredHasBigRotation) >= 0;
    800810
    801     m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, timeOffset, listsMatch));
     811    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, WTF::currentTime() - timeOffset, listsMatch));
    802812    m_animationStartedTimer.startOneShot(0);
    803     didChangeLayerState();
     813    didChangeAnimations();
    804814    return true;
    805815}
     
    808818{
    809819    m_animations.pause(animationName, timeOffset);
     820    didChangeAnimations();
    810821}
    811822
     
    813824{
    814825    m_animations.remove(animationName);
     826    didChangeAnimations();
    815827}
    816828
     
    819831    client()->notifyAnimationStarted(this, /* DOM time */ WTF::currentTime());
    820832}
    821 
    822 void CoordinatedGraphicsLayer::setAnimatedTransform(const TransformationMatrix& transform)
    823 {
    824     m_effectiveTransform = transform;
    825     didChangeAnimatedProperties();
    826     m_shouldUpdateVisibleRect = true;
    827 }
    828 
    829 void CoordinatedGraphicsLayer::setAnimatedOpacity(float opacity)
    830 {
    831     m_effectiveOpacity = opacity;
    832     didChangeAnimatedProperties();
    833 }
    834 
    835833}
    836834#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h

    r131297 r132275  
    4343namespace WebCore {
    4444class CoordinatedGraphicsLayer;
     45class GraphicsLayerAnimations;
    4546}
    4647
     
    6768#endif
    6869
    69     virtual void setLayerAnimatedOpacity(WebLayerID, float) = 0;
    70     virtual void setLayerAnimatedTransform(WebLayerID, const WebCore::TransformationMatrix&) = 0;
     70    virtual void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&) = 0;
    7171
    7272    virtual void attachLayer(WebCore::CoordinatedGraphicsLayer*) = 0;
     
    8080
    8181class CoordinatedGraphicsLayer : public WebCore::GraphicsLayer
    82                        , public TiledBackingStoreClient
    83                        , public WebKit::CoordinatedTileClient
    84                        , public GraphicsLayerAnimation::Client {
     82    , public TiledBackingStoreClient
     83    , public WebKit::CoordinatedTileClient {
    8584public:
    8685    CoordinatedGraphicsLayer(GraphicsLayerClient*);
     
    167166    void updateContentBuffers();
    168167    void purgeBackingStores();
    169 
    170     // GraphicsLayerAnimation::Client
    171     virtual void setAnimatedTransform(const TransformationMatrix&);
    172     virtual void setAnimatedOpacity(float);
     168    bool hasPendingVisibleChanges();
    173169
    174170    virtual bool addAnimation(const KeyframeValueList&, const IntSize&, const Animation*, const String&, double);
     
    189185    bool m_shouldSyncChildren: 1;
    190186    bool m_shouldSyncFilters: 1;
    191     bool m_shouldSyncAnimatedProperties: 1;
     187    bool m_shouldSyncAnimations: 1;
    192188    bool m_fixedToViewport : 1;
    193189    bool m_canvasNeedsDisplay : 1;
    194190
    195191    void notifyChange();
    196     void didChangeAnimatedProperties();
     192    void didChangeAnimations();
    197193    void didChangeGeometry();
    198194    void didChangeLayerState();
     
    212208    void computeTransformedVisibleRect();
    213209    void syncLayerParameters();
    214     void syncAnimatedProperties();
     210    void syncAnimations();
    215211    void setShouldUpdateVisibleRect();
    216212    float effectiveContentsScale();
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp

    r131741 r132275  
    8383    , m_layerFlushSchedulingEnabled(true)
    8484    , m_forceRepaintAsyncCallbackID(0)
     85    , m_animationsLocked(false)
    8586{
    8687    // Create a root layer.
     
    388389}
    389390
     391void LayerTreeCoordinator::lockAnimations()
     392{
     393    m_animationsLocked = true;
     394    m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetAnimationsLocked(true));
     395}
     396
     397void LayerTreeCoordinator::unlockAnimations()
     398{
     399    if (!m_animationsLocked)
     400        return;
     401
     402    m_animationsLocked = false;
     403    m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetAnimationsLocked(false));
     404}
     405
    390406void LayerTreeCoordinator::performScheduledLayerFlush()
    391407{
     
    393409        return;
    394410
     411    // We lock the animations while performing layout, to avoid flickers caused by animations continuing in the UI process while
     412    // the web process layout wants to cancel them.
     413    lockAnimations();
    395414    syncDisplayState();
     415
     416    // We can unlock the animations before flushing if there are no visible changes, for example if there are content updates
     417    // in a layer with opacity 0.
     418    bool canUnlockBeforeFlush = !m_isValid || !toCoordinatedGraphicsLayer(m_rootLayer.get())->hasPendingVisibleChanges();
     419    if (canUnlockBeforeFlush)
     420        unlockAnimations();
    396421
    397422    if (!m_isValid)
     
    581606
    582607
    583 void LayerTreeCoordinator::setLayerAnimatedOpacity(WebLayerID id, float opacity)
    584 {
    585     m_shouldSyncFrame = true;
    586     m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetLayerAnimatedOpacity(id, opacity));
    587 }
    588 
    589 void LayerTreeCoordinator::setLayerAnimatedTransform(WebLayerID id, const TransformationMatrix& transform)
    590 {
    591     m_shouldSyncFrame = true;
    592     m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetLayerAnimatedTransform(id, transform));
     608void LayerTreeCoordinator::setLayerAnimations(WebLayerID layerID, const GraphicsLayerAnimations& animations)
     609{
     610    m_shouldSyncFrame = true;
     611    m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetLayerAnimations(layerID, animations.getActiveAnimations()));
    593612}
    594613
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h

    r131807 r132275  
    8585    virtual void syncLayerState(WebLayerID, const WebLayerInfo&);
    8686    virtual void syncLayerChildren(WebLayerID, const Vector<WebLayerID>&);
    87     virtual void setLayerAnimatedOpacity(WebLayerID, float);
    88     virtual void setLayerAnimatedTransform(WebLayerID, const WebCore::TransformationMatrix&);
     87    virtual void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
    8988#if ENABLE(CSS_FILTERS)
    9089    virtual void syncLayerFilters(WebLayerID, const WebCore::FilterOperations&);
     
    122121    void didPerformScheduledLayerFlush();
    123122    void syncDisplayState();
     123    void lockAnimations();
     124    void unlockAnimations();
    124125
    125126    void layerFlushTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
     
    157158    bool m_layerFlushSchedulingEnabled;
    158159    uint64_t m_forceRepaintAsyncCallbackID;
     160    bool m_animationsLocked;
    159161};
    160162
Note: See TracChangeset for help on using the changeset viewer.