| Index: third_party/WebKit/Source/core/animation/SampledEffect.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/SampledEffect.cpp b/third_party/WebKit/Source/core/animation/SampledEffect.cpp
|
| index 30aee7ab143d913f88ab898e5b86e384e2d22815..bad5be900f7b94aefacc5fa42d5d77d87c30c2a6 100644
|
| --- a/third_party/WebKit/Source/core/animation/SampledEffect.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/SampledEffect.cpp
|
| @@ -8,7 +8,6 @@ namespace blink {
|
|
|
| SampledEffect::SampledEffect(KeyframeEffect* effect)
|
| : m_effect(effect)
|
| - , m_animation(effect->animation())
|
| , m_sequenceNumber(effect->animation()->sequenceNumber())
|
| , m_priority(effect->priority())
|
| {
|
| @@ -17,14 +16,35 @@ SampledEffect::SampledEffect(KeyframeEffect* effect)
|
| void SampledEffect::clear()
|
| {
|
| m_effect = nullptr;
|
| - m_animation = nullptr;
|
| m_interpolations.clear();
|
| }
|
|
|
| +bool SampledEffect::willNeverChange() const
|
| +{
|
| + return !m_effect || !m_effect->animation();
|
| +}
|
| +
|
| +void SampledEffect::removeReplacedInterpolations(const HashSet<PropertyHandle>& replacedProperties)
|
| +{
|
| + size_t newSize = 0;
|
| + for (auto& interpolation : m_interpolations) {
|
| + if (!replacedProperties.contains(interpolation->property()))
|
| + m_interpolations[newSize++].swap(interpolation);
|
| + }
|
| + m_interpolations.shrink(newSize);
|
| +}
|
| +
|
| +void SampledEffect::updateReplacedProperties(HashSet<PropertyHandle>& replacedProperties)
|
| +{
|
| + for (const auto& interpolation : m_interpolations) {
|
| + if (!interpolation->dependsOnUnderlyingValue())
|
| + replacedProperties.add(interpolation->property());
|
| + }
|
| +}
|
| +
|
| DEFINE_TRACE(SampledEffect)
|
| {
|
| visitor->trace(m_effect);
|
| - visitor->trace(m_animation);
|
| }
|
|
|
| } // namespace blink
|
|
|