Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/AnimationStack.cpp |
| diff --git a/third_party/WebKit/Source/core/animation/AnimationStack.cpp b/third_party/WebKit/Source/core/animation/AnimationStack.cpp |
| index 4b06a852acff8c35f60cc561a28afd9b10969726..39064db638499e803abd6e4685e9cca90afce0d4 100644 |
| --- a/third_party/WebKit/Source/core/animation/AnimationStack.cpp |
| +++ b/third_party/WebKit/Source/core/animation/AnimationStack.cpp |
| @@ -43,9 +43,11 @@ namespace blink { |
| namespace { |
| -void copyToActiveInterpolationsMap(const Vector<RefPtr<Interpolation>>& source, ActiveInterpolationsMap& target) |
| +void copyToActiveInterpolationsMap(const Vector<RefPtr<Interpolation>>& source, AnimationStack::PropertyHandleFilter propertyHandleFilter, ActiveInterpolationsMap& target) |
| { |
| for (const auto& interpolation : source) { |
| + if (propertyHandleFilter && !propertyHandleFilter(interpolation->property())) |
| + continue; |
| ActiveInterpolationsMap::AddResult entry = target.add(interpolation->property(), ActiveInterpolations(1)); |
| ActiveInterpolations& activeInterpolations = entry.storedValue->value; |
| if (!entry.isNewEntry |
| @@ -65,13 +67,13 @@ bool compareEffects(const Member<SampledEffect>& effect1, const Member<SampledEf |
| return effect1->sequenceNumber() < effect2->sequenceNumber(); |
| } |
| -void copyNewAnimationsToActiveInterpolationsMap(const HeapVector<Member<InertEffect>>& newAnimations, ActiveInterpolationsMap& result) |
| +void copyNewAnimationsToActiveInterpolationsMap(const HeapVector<Member<InertEffect>>& newAnimations, AnimationStack::PropertyHandleFilter propertyHandleFilter, ActiveInterpolationsMap& result) |
| { |
| for (const auto& newAnimation : newAnimations) { |
| Vector<RefPtr<Interpolation>> sample; |
| newAnimation->sample(sample); |
| if (!sample.isEmpty()) |
| - copyToActiveInterpolationsMap(sample, result); |
| + copyToActiveInterpolationsMap(sample, propertyHandleFilter, result); |
| } |
| } |
| @@ -91,7 +93,7 @@ bool AnimationStack::hasActiveAnimationsOnCompositor(CSSPropertyID property) con |
| return false; |
| } |
| -ActiveInterpolationsMap AnimationStack::activeInterpolations(AnimationStack* animationStack, const HeapVector<Member<InertEffect>>* newAnimations, const HeapHashSet<Member<const Animation>>* suppressedAnimations, KeyframeEffect::Priority priority, double timelineCurrentTime) |
| +ActiveInterpolationsMap AnimationStack::activeInterpolations(AnimationStack* animationStack, const HeapVector<Member<InertEffect>>* newAnimations, const HeapHashSet<Member<const Animation>>* suppressedAnimations, KeyframeEffect::Priority priority, double timelineCurrentTime, PropertyHandleFilter propertyHandleFilter) |
| { |
| // We don't exactly know when new animations will start, but timelineCurrentTime is a good estimate. |
|
dstockwell
2015/10/21 01:00:39
Needs a rebase. Took me a while to figure out what
alancutter (OOO until 2018)
2015/10/21 04:22:16
Done.
|
| @@ -105,12 +107,12 @@ ActiveInterpolationsMap AnimationStack::activeInterpolations(AnimationStack* ani |
| for (const auto& effect : effects) { |
| if (effect->priority() != priority || (suppressedAnimations && effect->effect() && suppressedAnimations->contains(effect->effect()->animation()))) |
| continue; |
| - copyToActiveInterpolationsMap(effect->interpolations(), result); |
| + copyToActiveInterpolationsMap(effect->interpolations(), propertyHandleFilter, result); |
| } |
| } |
| if (newAnimations) |
| - copyNewAnimationsToActiveInterpolationsMap(*newAnimations, result); |
| + copyNewAnimationsToActiveInterpolationsMap(*newAnimations, propertyHandleFilter, result); |
| return result; |
| } |