| Index: Source/core/animation/AnimationStack.cpp
|
| diff --git a/Source/core/animation/AnimationStack.cpp b/Source/core/animation/AnimationStack.cpp
|
| index 178d1d9013beb52df4df83a6bc2de26632b46eca..071481f12e468d4349c52a2818d0b1c7d7a20e2b 100644
|
| --- a/Source/core/animation/AnimationStack.cpp
|
| +++ b/Source/core/animation/AnimationStack.cpp
|
| @@ -42,10 +42,20 @@ namespace blink {
|
|
|
| namespace {
|
|
|
| -void copyToActiveInterpolationMap(const WillBeHeapVector<RefPtrWillBeMember<blink::Interpolation> >& source, WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<blink::Interpolation> >& target)
|
| +void copyToActiveInterpolationMap(const WillBeHeapVector<RefPtrWillBeMember<blink::Interpolation>>& source, InterpolationPipelineMap& target)
|
| {
|
| for (const auto& interpolation : source) {
|
| - target.set(toStyleInterpolation(interpolation.get())->id(), interpolation.get());
|
| + CSSPropertyID property = toStyleInterpolation(interpolation.get())->id();
|
| +
|
| + RefPtrWillBeRawPtr<InterpolationPipelineStage> newStage = InterpolationPipelineStage::create(interpolation);
|
| +
|
| + RefPtrWillBeRawPtr<InterpolationPipeline> pipeline = target.get(property);
|
| + if (!pipeline) {
|
| + pipeline = InterpolationPipeline::create();
|
| + target.set(property, pipeline);
|
| + }
|
| +
|
| + pipeline->append(newStage);
|
| }
|
| }
|
|
|
| @@ -55,7 +65,7 @@ bool compareEffects(const OwnPtrWillBeMember<SampledEffect>& effect1, const OwnP
|
| return effect1->sequenceNumber() < effect2->sequenceNumber();
|
| }
|
|
|
| -void copyNewAnimationsToActiveInterpolationMap(const WillBeHeapVector<RawPtrWillBeMember<InertAnimation> >& newAnimations, WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >& result)
|
| +void copyNewAnimationsToActiveInterpolationMap(const WillBeHeapVector<RawPtrWillBeMember<InertAnimation>>& newAnimations, InterpolationPipelineMap& result)
|
| {
|
| for (const auto& newAnimation : newAnimations) {
|
| OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> sample = nullptr;
|
| @@ -89,14 +99,14 @@ bool AnimationStack::hasActiveAnimationsOnCompositor(CSSPropertyID property) con
|
| return false;
|
| }
|
|
|
| -WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > AnimationStack::activeInterpolations(AnimationStack* animationStack, const WillBeHeapVector<RawPtrWillBeMember<InertAnimation> >* newAnimations, const WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer> >* suppressedAnimationPlayers, Animation::Priority priority, double timelineCurrentTime)
|
| +InterpolationPipelineMap AnimationStack::activeInterpolations(AnimationStack* animationStack, const WillBeHeapVector<RawPtrWillBeMember<InertAnimation>>* newAnimations, const WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>>* suppressedAnimationPlayers, Animation::Priority priority, double timelineCurrentTime)
|
| {
|
| // We don't exactly know when new animations will start, but timelineCurrentTime is a good estimate.
|
|
|
| - WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result;
|
| + InterpolationPipelineMap result;
|
|
|
| if (animationStack) {
|
| - WillBeHeapVector<OwnPtrWillBeMember<SampledEffect> >& effects = animationStack->m_effects;
|
| + WillBeHeapVector<OwnPtrWillBeMember<SampledEffect>>& effects = animationStack->m_effects;
|
| // std::sort doesn't work with OwnPtrs
|
| nonCopyingSort(effects.begin(), effects.end(), compareEffects);
|
| animationStack->simplifyEffects();
|
|
|