⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268877 in webkit


Ignore:
Timestamp:
Oct 22, 2020, 11:26:43 AM (6 years ago)
Author:
Alan Coon
Message:

Revert r268483. rdar://problem/70578639

Location:
branches/safari-611.1.4-branch/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611.1.4-branch/Source/WebCore/ChangeLog

    r268876 r268877  
     12020-10-22  Alan Coon  <alancoon@apple.com>
     2
     3        Revert r268483. rdar://problem/70578639
     4
    152020-10-22  Alan Coon  <alancoon@apple.com>
    26
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r268876 r268877  
    271271}
    272272
     273static String animationIdentifier(const String& animationName, AnimatedPropertyID property, int index, int subIndex)
     274{
     275    return makeString(animationName, '_', static_cast<unsigned>(property), '_', index, '_', subIndex);
     276}
     277
    273278static bool animationHasStepsTimingFunction(const KeyframeValueList& valueList, const Animation* anim)
    274279{
     
    689694void GraphicsLayerCA::moveOrCopyAnimations(MoveOrCopy operation, PlatformCALayer *fromLayer, PlatformCALayer *toLayer)
    690695{
    691     for (auto& animation : m_animations) {
    692         if ((animation.m_property == AnimatedPropertyTransform
    693             || animation.m_property == AnimatedPropertyOpacity
    694             || animation.m_property == AnimatedPropertyBackgroundColor
    695             || animation.m_property == AnimatedPropertyFilter)
    696             && (animation.m_playState == PlayState::Playing || animation.m_playState == PlayState::Paused))
    697             moveOrCopyLayerAnimation(operation, animation.animationIdentifier(), fromLayer, toLayer);
     696    if (!hasAnimations())
     697        return;
     698
     699    // Look for running animations affecting this property.
     700    for (const auto& it : m_animations->runningAnimations) {
     701        const auto& propertyAnimations = it.value;
     702        size_t numAnimations = propertyAnimations.size();
     703        for (size_t i = 0; i < numAnimations; ++i) {
     704            const LayerPropertyAnimation& currAnimation = propertyAnimations[i];
     705
     706            if (currAnimation.m_property == AnimatedPropertyTransform
     707                || currAnimation.m_property == AnimatedPropertyOpacity
     708                || currAnimation.m_property == AnimatedPropertyBackgroundColor
     709                || currAnimation.m_property == AnimatedPropertyFilter)
     710                moveOrCopyLayerAnimation(operation, animationIdentifier(currAnimation.m_name, currAnimation.m_property, currAnimation.m_index, currAnimation.m_subIndex), fromLayer, toLayer);
     711        }
    698712    }
    699713}
     
    10131027}
    10141028
    1015 bool GraphicsLayerCA::animationIsRunning(const String& animationName) const
    1016 {
    1017     auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
    1018         return animation.m_name == animationName;
    1019     });
    1020     return index != notFound && m_animations[index].m_playState == PlayState::Playing;
    1021 }
    1022 
    1023 static bool animationCanBeAccelerated(const KeyframeValueList& valueList, const Animation* anim)
     1029bool GraphicsLayerCA::animationCanBeAccelerated(const KeyframeValueList& valueList, const Animation* anim) const
    10241030{
    10251031    if (anim->playbackRate() != 1 || !anim->directionIsForwards())
     
    10331039
    10341040    return true;
     1041}
     1042
     1043void GraphicsLayerCA::addProcessingActionForAnimation(const String& animationName, AnimationProcessingAction processingAction)
     1044{
     1045    ensureLayerAnimations();
     1046
     1047    auto& processingActions = m_animations->animationsToProcess.ensure(animationName, [] {
     1048        return Vector<AnimationProcessingAction> { };
     1049    }).iterator->value;
     1050
     1051    if (!processingActions.isEmpty() && processingActions.last().action == Remove)
     1052        return;
     1053
     1054    processingActions.append(processingAction);
    10351055}
    10361056
     
    10701090    LOG_WITH_STREAM(Animations, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " pauseAnimation " << animationName << " (is running " << animationIsRunning(animationName) << ")");
    10711091
    1072     auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
    1073         return animation.m_name == animationName && !animation.m_pendingRemoval;
    1074     });
    1075 
    1076     if (index == notFound)
    1077         return;
    1078 
    1079     auto& animation = m_animations[index];
    1080     animation.m_playState = PlayState::PausePending;
    1081     animation.m_timeOffset = Seconds { timeOffset };
     1092    // Call add since if there is already a Remove in there, we don't want to overwrite it with a Pause.
     1093    addProcessingActionForAnimation(animationName, AnimationProcessingAction { Pause, Seconds { timeOffset } });
    10821094
    10831095    noteLayerPropertyChanged(AnimationChanged);
     
    10881100    LOG_WITH_STREAM(Animations, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " removeAnimation " << animationName << " (is running " << animationIsRunning(animationName) << ")");
    10891101
    1090     auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
    1091         return animation.m_name == animationName && !animation.m_pendingRemoval;
    1092     });
    1093 
    1094     if (index == notFound)
    1095         return;
    1096 
    1097     m_animations[index].m_pendingRemoval = true;
    1098 
     1102    if (!animationIsRunning(animationName)) {
     1103        removeFromUncommittedAnimations(animationName);
     1104        return;
     1105    }
     1106
     1107    addProcessingActionForAnimation(animationName, AnimationProcessingAction(Remove));
    10991108    noteLayerPropertyChanged(AnimationChanged | CoverageRectChanged);
    11001109}
     
    11031112{
    11041113    LOG_WITH_STREAM(Animations, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " platformCALayerAnimationStarted " << animationKey);
    1105 
    1106     auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
    1107         return animation.animationIdentifier() == animationKey && !animation.m_beginTime;
    1108     });
    1109 
    1110     if (index != notFound)
    1111         m_animations[index].m_beginTime = startTime.secondsSinceEpoch();
    1112 
    11131114    client().notifyAnimationStarted(this, animationKey, startTime);
    11141115}
     
    28522853void GraphicsLayerCA::updateAnimations()
    28532854{
    2854     // Remove all animations so far.
    2855     for (auto& animation : m_animations)
    2856         removeCAAnimationFromLayer(animation);
    2857 
    2858     // Remove all animations from the list that were pending removal.
    2859     m_animations.removeAllMatching([&](LayerPropertyAnimation animation) {
    2860         return animation.m_pendingRemoval;
    2861     });
    2862 
    2863     // Add all remaining animations.
    2864     for (auto& animation : m_animations) {
    2865         setAnimationOnLayer(animation);
    2866         if (animation.m_playState == PlayState::PausePending || animation.m_playState == PlayState::Paused) {
    2867             pauseCAAnimationOnLayer(animation);
    2868             animation.m_playState = PlayState::Paused;
    2869         } else
    2870             animation.m_playState = PlayState::Playing;
     2855    if (!hasAnimations())
     2856        return;
     2857
     2858    size_t numAnimations;
     2859    if ((numAnimations = m_animations->uncomittedAnimations.size())) {
     2860        for (size_t i = 0; i < numAnimations; ++i) {
     2861            const LayerPropertyAnimation& pendingAnimation = m_animations->uncomittedAnimations[i];
     2862            setAnimationOnLayer(*pendingAnimation.m_animation, pendingAnimation.m_property, pendingAnimation.m_name, pendingAnimation.m_index, pendingAnimation.m_subIndex, pendingAnimation.m_timeOffset);
     2863
     2864            AnimationsMap::iterator it = m_animations->runningAnimations.find(pendingAnimation.m_name);
     2865            if (it == m_animations->runningAnimations.end()) {
     2866                Vector<LayerPropertyAnimation> animations;
     2867                animations.append(pendingAnimation);
     2868                m_animations->runningAnimations.add(pendingAnimation.m_name, animations);
     2869            } else {
     2870                Vector<LayerPropertyAnimation>& animations = it->value;
     2871                animations.append(pendingAnimation);
     2872            }
     2873        }
     2874        m_animations->uncomittedAnimations.clear();
     2875    }
     2876
     2877    if (m_animations->animationsToProcess.size()) {
     2878        for (const auto& it : m_animations->animationsToProcess) {
     2879            const String& currentAnimationName = it.key;
     2880            auto animationIterator = m_animations->runningAnimations.find(currentAnimationName);
     2881            if (animationIterator == m_animations->runningAnimations.end())
     2882                continue;
     2883
     2884            for (const auto& processingInfo : it.value) {
     2885                const Vector<LayerPropertyAnimation>& animations = animationIterator->value;
     2886                for (const auto& currentAnimation : animations) {
     2887                    switch (processingInfo.action) {
     2888                    case Remove:
     2889                        removeCAAnimationFromLayer(currentAnimation.m_property, currentAnimationName, currentAnimation.m_index, currentAnimation.m_subIndex);
     2890                        break;
     2891                    case Pause:
     2892                        pauseCAAnimationOnLayer(currentAnimation.m_property, currentAnimationName, currentAnimation.m_index, currentAnimation.m_subIndex, processingInfo.timeOffset);
     2893                        break;
     2894                    }
     2895                }
     2896
     2897                if (processingInfo.action == Remove)
     2898                    m_animations->runningAnimations.remove(currentAnimationName);
     2899            }
     2900        }
     2901
     2902        m_animations->animationsToProcess.clear();
    28712903    }
    28722904}
     
    28742906bool GraphicsLayerCA::isRunningTransformAnimation() const
    28752907{
    2876     return m_animations.findMatching([&](LayerPropertyAnimation animation) {
    2877         return animation.m_property == AnimatedPropertyTransform && animation.m_playState == PlayState::Playing;
    2878     }) != notFound;
    2879 }
    2880 
    2881 void GraphicsLayerCA::setAnimationOnLayer(LayerPropertyAnimation& animation)
    2882 {
    2883     auto property = animation.m_property;
     2908    if (!hasAnimations())
     2909        return false;
     2910
     2911    for (const auto& it : m_animations->runningAnimations) {
     2912        const auto& propertyAnimations = it.value;
     2913        size_t numAnimations = propertyAnimations.size();
     2914        for (size_t i = 0; i < numAnimations; ++i) {
     2915            const LayerPropertyAnimation& currAnimation = propertyAnimations[i];
     2916            if (currAnimation.m_property == AnimatedPropertyTransform)
     2917                return true;
     2918        }
     2919    }
     2920    return false;
     2921}
     2922
     2923void GraphicsLayerCA::ensureLayerAnimations()
     2924{
     2925    if (!m_animations)
     2926        m_animations = makeUnique<LayerAnimations>();
     2927}
     2928
     2929void GraphicsLayerCA::setAnimationOnLayer(PlatformCAAnimation& caAnim, AnimatedPropertyID property, const String& animationName, int index, int subIndex, Seconds timeOffset)
     2930{
    28842931    PlatformCALayer* layer = animatedLayer(property);
    28852932
    2886     auto& caAnim = *animation.m_animation;
    2887 
    2888     if (animation.m_timeOffset) {
    2889         // In case we have an offset, we need to record the beginTime now since we have to pass in an explicit
    2890         // value in the first place.
    2891         if (!animation.m_beginTime)
    2892             animation.m_beginTime = Seconds(CACurrentMediaTime());
    2893         caAnim.setBeginTime((animation.m_beginTime - animation.m_timeOffset).seconds());
    2894     } else if (animation.m_beginTime) {
    2895         // If we already have a begin time, then we already started in the past and must ensure we use that same
    2896         // begin time. Any other case will get use the CA transaction's time as its begin time and will be recorded
    2897         // in platformCALayerAnimationStarted().
    2898         caAnim.setBeginTime(animation.m_beginTime.seconds());
    2899     }
    2900 
    2901     String animationID = animation.animationIdentifier();
     2933    if (timeOffset)
     2934        caAnim.setBeginTime(CACurrentMediaTime() - timeOffset.seconds());
     2935
     2936    String animationID = animationIdentifier(animationName, property, index, subIndex);
    29022937
    29032938    layer->removeAnimationForKey(animationID);
     
    29302965}
    29312966
    2932 bool GraphicsLayerCA::removeCAAnimationFromLayer(LayerPropertyAnimation& animation)
    2933 {
    2934     PlatformCALayer* layer = animatedLayer(animation.m_property);
    2935 
    2936     String animationID = animation.animationIdentifier();
     2967bool GraphicsLayerCA::removeCAAnimationFromLayer(AnimatedPropertyID property, const String& animationName, int index, int subIndex)
     2968{
     2969    PlatformCALayer* layer = animatedLayer(property);
     2970
     2971    String animationID = animationIdentifier(animationName, property, index, subIndex);
    29372972
    29382973    if (!layer->animationForKey(animationID))
     
    29422977    bug7311367Workaround(m_structuralLayer.get(), transform());
    29432978
    2944     if (LayerMap* layerCloneMap = animatedLayerClones(animation.m_property)) {
     2979    if (LayerMap* layerCloneMap = animatedLayerClones(property)) {
    29452980        for (auto& clone : *layerCloneMap) {
    29462981            // Skip immediate replicas, since they move with the original.
     
    29542989}
    29552990
    2956 void GraphicsLayerCA::pauseCAAnimationOnLayer(LayerPropertyAnimation& animation)
    2957 {
    2958     PlatformCALayer* layer = animatedLayer(animation.m_property);
    2959 
    2960     String animationID = animation.animationIdentifier();
     2991void GraphicsLayerCA::pauseCAAnimationOnLayer(AnimatedPropertyID property, const String& animationName, int index, int subIndex, Seconds timeOffset)
     2992{
     2993    PlatformCALayer* layer = animatedLayer(property);
     2994
     2995    String animationID = animationIdentifier(animationName, property, index, subIndex);
    29612996
    29622997    RefPtr<PlatformCAAnimation> curAnim = layer->animationForKey(animationID);
     
    29683003
    29693004    newAnim->setSpeed(0);
    2970     newAnim->setTimeOffset(animation.m_timeOffset.seconds());
     3005    newAnim->setTimeOffset(timeOffset.seconds());
    29713006
    29723007    layer->addAnimationForKey(animationID, *newAnim); // This will replace the running animation.
    29733008
    29743009    // Pause the animations on the clones too.
    2975     if (LayerMap* layerCloneMap = animatedLayerClones(animation.m_property)) {
     3010    if (LayerMap* layerCloneMap = animatedLayerClones(property)) {
    29763011        for (auto& clone : *layerCloneMap) {
    29773012            // Skip immediate replicas, since they move with the original.
     
    30343069        return false;
    30353070
    3036     m_animations.append(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset));
     3071    appendToUncommittedAnimations(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset));
    30373072
    30383073    return true;
     
    30653100        return false;
    30663101
    3067     m_animations.append(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset));
     3102    appendToUncommittedAnimations(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, 0, timeOffset));
    30683103    return true;
    30693104}
     
    31253160        ASSERT(valuesOK);
    31263161
    3127         m_animations.append(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, internalFilterPropertyIndex, timeOffset));
     3162        appendToUncommittedAnimations(LayerPropertyAnimation(caAnimation.releaseNonNull(), animationName, valueList.property(), animationIndex, internalFilterPropertyIndex, timeOffset));
    31283163    }
    31293164
    31303165    return true;
     3166}
     3167
     3168void GraphicsLayerCA::appendToUncommittedAnimations(LayerPropertyAnimation&& animation)
     3169{
     3170    ensureLayerAnimations();
     3171
     3172    // Since we're adding a new animation, make sure we clear any pending AnimationProcessingAction for this animation
     3173    // as these are applied after we've committed new animations. However, we want to check if we had a pending removal
     3174    // such that removing an animation prior to adding a new one for the same name works.
     3175    auto processingInfoIterator = m_animations->animationsToProcess.find(animation.m_name);
     3176    if (processingInfoIterator != m_animations->animationsToProcess.end()) {
     3177        auto animationIterator = m_animations->runningAnimations.find(animation.m_name);
     3178        if (animationIterator != m_animations->runningAnimations.end()) {
     3179            auto& animations = animationIterator->value;
     3180            for (const auto& processingInfo : processingInfoIterator->value) {
     3181                if (processingInfo.action == Remove) {
     3182                    for (const auto& currentAnimation : animations)
     3183                        removeCAAnimationFromLayer(currentAnimation.m_property, animation.m_name, currentAnimation.m_index, currentAnimation.m_subIndex);
     3184                    m_animations->runningAnimations.remove(animationIterator);
     3185                    break;
     3186                }
     3187            }
     3188        }
     3189        m_animations->animationsToProcess.remove(processingInfoIterator);
     3190    }
     3191
     3192    m_animations->uncomittedAnimations.append(WTFMove(animation));
     3193}
     3194
     3195void GraphicsLayerCA::removeFromUncommittedAnimations(const String& animationName)
     3196{
     3197    if (!m_animations)
     3198        return;
     3199
     3200    m_animations->uncomittedAnimations.removeFirstMatching([&animationName] (auto& current) {
     3201        return current.m_name == animationName;
     3202    });
    31313203}
    31323204
     
    42374309    Vector<std::pair<String, double>> animations;
    42384310
    4239     for (auto& animation : m_animations) {
    4240         auto caAnimation = animatedLayer(animation.m_property)->animationForKey(animation.animationIdentifier());
    4241         animations.append({ animatedPropertyIDAsString(animation.m_property), caAnimation->speed() });
     4311    if (hasAnimations()) {
     4312        for (auto it : m_animations->runningAnimations) {
     4313            auto& propertyAnimations = it.value;
     4314            size_t numAnimations = propertyAnimations.size();
     4315            for (size_t i = 0; i < numAnimations; ++i) {
     4316                const LayerPropertyAnimation& currAnimation = propertyAnimations[i];
     4317                auto caAnimation = animatedLayer(currAnimation.m_property)->animationForKey(animationIdentifier(currAnimation.m_name, currAnimation.m_property, currAnimation.m_index, currAnimation.m_subIndex));
     4318                animations.append({ animatedPropertyIDAsString(currAnimation.m_property), caAnimation->speed() });
     4319            }
     4320        }
    42424321    }
    42434322
  • branches/safari-611.1.4-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r268876 r268877  
    184184    WEBCORE_EXPORT void setOpacityInternal(float) override;
    185185   
     186    WEBCORE_EXPORT bool animationCanBeAccelerated(const KeyframeValueList&, const Animation*) const;
     187
    186188private:
    187189    bool isGraphicsLayerCA() const override { return true; }
     
    274276    WEBCORE_EXPORT bool backingStoreAttachedForTesting() const override;
    275277
    276     bool hasAnimations() const { return !m_animations.isEmpty(); }
    277     bool animationIsRunning(const String& animationName) const;
     278    bool hasAnimations() const { return m_animations.get(); }
     279    bool animationIsRunning(const String& animationName) const
     280    {
     281        return m_animations && m_animations->runningAnimations.contains(animationName);
     282    }
    278283
    279284    void commitLayerChangesBeforeSublayers(CommitState&, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool& layerTypeChanged);
     
    448453    bool ensureStructuralLayer(StructuralLayerPurpose);
    449454    StructuralLayerPurpose structuralLayerPurpose() const;
     455   
     456    void ensureLayerAnimations();
     457
     458    void setAnimationOnLayer(PlatformCAAnimation&, AnimatedPropertyID, const String& animationName, int index, int subIndex, Seconds timeOffset);
     459    bool removeCAAnimationFromLayer(AnimatedPropertyID, const String& animationName, int index, int subINdex);
     460    void pauseCAAnimationOnLayer(AnimatedPropertyID, const String& animationName, int index, int subIndex, Seconds timeOffset);
     461
     462    enum MoveOrCopy { Move, Copy };
     463    static void moveOrCopyLayerAnimation(MoveOrCopy, const String& animationIdentifier, PlatformCALayer *fromLayer, PlatformCALayer *toLayer);
     464    void moveOrCopyAnimations(MoveOrCopy, PlatformCALayer* fromLayer, PlatformCALayer* toLayer);
     465
     466    void moveAnimations(PlatformCALayer* fromLayer, PlatformCALayer* toLayer)
     467    {
     468        moveOrCopyAnimations(Move, fromLayer, toLayer);
     469    }
     470    void copyAnimations(PlatformCALayer* fromLayer, PlatformCALayer* toLayer)
     471    {
     472        moveOrCopyAnimations(Copy, fromLayer, toLayer);
     473    }
    450474
    451475    // This represents the animation of a single property. There may be multiple transform animations for
    452476    // a single transition or keyframe animation, so index is used to distinguish these.
    453     enum class PlayState { Playing, PlayPending, Paused, PausePending };
    454477    struct LayerPropertyAnimation {
    455478        LayerPropertyAnimation(Ref<PlatformCAAnimation>&& caAnimation, const String& animationName, AnimatedPropertyID property, int index, int subIndex, Seconds timeOffset)
     
    462485        { }
    463486
    464         String animationIdentifier() const { return makeString(m_name, '_', static_cast<unsigned>(m_property), '_', m_index, '_', m_subIndex); }
    465 
    466487        RefPtr<PlatformCAAnimation> m_animation;
    467488        String m_name;
     
    469490        int m_index;
    470491        int m_subIndex;
    471         Seconds m_timeOffset { 0_s };
    472         Seconds m_beginTime { 0_s };
    473         PlayState m_playState { PlayState::PlayPending };
    474         bool m_pendingRemoval { false };
    475     };
    476 
    477     void setAnimationOnLayer(LayerPropertyAnimation&);
    478     bool removeCAAnimationFromLayer(LayerPropertyAnimation&);
    479     void pauseCAAnimationOnLayer(LayerPropertyAnimation&);
    480 
    481     enum MoveOrCopy { Move, Copy };
    482     static void moveOrCopyLayerAnimation(MoveOrCopy, const String& animationIdentifier, PlatformCALayer *fromLayer, PlatformCALayer *toLayer);
    483     void moveOrCopyAnimations(MoveOrCopy, PlatformCALayer* fromLayer, PlatformCALayer* toLayer);
    484 
    485     void moveAnimations(PlatformCALayer* fromLayer, PlatformCALayer* toLayer)
    486     {
    487         moveOrCopyAnimations(Move, fromLayer, toLayer);
    488     }
    489     void copyAnimations(PlatformCALayer* fromLayer, PlatformCALayer* toLayer)
    490     {
    491         moveOrCopyAnimations(Copy, fromLayer, toLayer);
    492     }
     492        Seconds m_timeOffset;
     493    };
    493494
    494495    bool appendToUncommittedAnimations(const KeyframeValueList&, const TransformOperations*, const Animation*, const String& animationName, const FloatSize& boxSize, int animationIndex, Seconds timeOffset, bool isMatrixAnimation);
    495496    bool appendToUncommittedAnimations(const KeyframeValueList&, const FilterOperation*, const Animation*, const String& animationName, int animationIndex, Seconds timeOffset);
     497    void appendToUncommittedAnimations(LayerPropertyAnimation&&);
     498    void removeFromUncommittedAnimations(const String&);
    496499
    497500    enum LayerChange : uint64_t {
     
    557560    void repaintLayerDirtyRects();
    558561
     562    enum Action { Remove, Pause };
     563    struct AnimationProcessingAction {
     564        AnimationProcessingAction(Action action = Remove, Seconds timeOffset = 0_s)
     565            : action(action)
     566            , timeOffset(timeOffset)
     567        {
     568        }
     569        Action action;
     570        Seconds timeOffset; // Only used for pause.
     571    };
     572    void addProcessingActionForAnimation(const String&, AnimationProcessingAction);
     573
    559574    LayerChangeFlags m_uncommittedChanges { 0 };
    560575
     
    597612    RetainPtr<CGImageRef> m_pendingContentsImage;
    598613   
    599     Vector<LayerPropertyAnimation> m_animations;
     614    typedef HashMap<String, Vector<AnimationProcessingAction>> AnimationsToProcessMap;
     615    typedef HashMap<String, Vector<LayerPropertyAnimation>> AnimationsMap;
     616    struct LayerAnimations {
     617        WTF_MAKE_STRUCT_FAST_ALLOCATED;
     618        Vector<LayerPropertyAnimation> uncomittedAnimations;
     619        AnimationsToProcessMap animationsToProcess;
     620        AnimationsMap runningAnimations;
     621    };
     622   
     623    std::unique_ptr<LayerAnimations> m_animations;
    600624
    601625    Vector<FloatRect> m_dirtyRects;
Note: See TracChangeset for help on using the changeset viewer.