| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 m_transitions.clear(); | 587 m_transitions.clear(); |
| 588 m_pendingUpdate = nullptr; | 588 m_pendingUpdate = nullptr; |
| 589 } | 589 } |
| 590 | 590 |
| 591 void CSSAnimations::calculateAnimationActiveInterpolations(CSSAnimationUpdate* u
pdate, const Element* animatingElement, double timelineCurrentTime) | 591 void CSSAnimations::calculateAnimationActiveInterpolations(CSSAnimationUpdate* u
pdate, const Element* animatingElement, double timelineCurrentTime) |
| 592 { | 592 { |
| 593 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac
tiveAnimations() : nullptr; | 593 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac
tiveAnimations() : nullptr; |
| 594 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau
ltStack() : nullptr; | 594 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau
ltStack() : nullptr; |
| 595 | 595 |
| 596 if (update->newAnimations().isEmpty() && update->suppressedAnimationAnimatio
nPlayers().isEmpty()) { | 596 if (update->newAnimations().isEmpty() && update->suppressedAnimationAnimatio
nPlayers().isEmpty()) { |
| 597 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> acti
veInterpolationsForAnimations(AnimationStack::activeInterpolations(animationStac
k, 0, 0, Animation::DefaultPriority, timelineCurrentTime)); | 597 InterpolationPipelineMap activeInterpolationsForAnimations(AnimationStac
k::activeInterpolations(animationStack, 0, 0, Animation::DefaultPriority, timeli
neCurrentTime)); |
| 598 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAn
imations); | 598 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAn
imations); |
| 599 return; | 599 return; |
| 600 } | 600 } |
| 601 | 601 |
| 602 WillBeHeapVector<RawPtrWillBeMember<InertAnimation>> newAnimations; | 602 WillBeHeapVector<RawPtrWillBeMember<InertAnimation>> newAnimations; |
| 603 for (const auto& newAnimation : update->newAnimations()) | 603 for (const auto& newAnimation : update->newAnimations()) |
| 604 newAnimations.append(newAnimation.animation.get()); | 604 newAnimations.append(newAnimation.animation.get()); |
| 605 for (const auto& updatedAnimation : update->animationsWithUpdates()) | 605 for (const auto& updatedAnimation : update->animationsWithUpdates()) |
| 606 newAnimations.append(updatedAnimation.animation.get()); // Animations wi
th updates use a temporary InertAnimation for the current frame. | 606 newAnimations.append(updatedAnimation.animation.get()); // Animations wi
th updates use a temporary InertAnimation for the current frame. |
| 607 | 607 |
| 608 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> activeIn
terpolationsForAnimations(AnimationStack::activeInterpolations(animationStack, &
newAnimations, &update->suppressedAnimationAnimationPlayers(), Animation::Defaul
tPriority, timelineCurrentTime)); | 608 InterpolationPipelineMap activeInterpolationsForAnimations(AnimationStack::a
ctiveInterpolations(animationStack, &newAnimations, &update->suppressedAnimation
AnimationPlayers(), Animation::DefaultPriority, timelineCurrentTime)); |
| 609 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAnimat
ions); | 609 update->adoptActiveInterpolationsForAnimations(activeInterpolationsForAnimat
ions); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void CSSAnimations::calculateTransitionActiveInterpolations(CSSAnimationUpdate*
update, const Element* animatingElement, double timelineCurrentTime) | 612 void CSSAnimations::calculateTransitionActiveInterpolations(CSSAnimationUpdate*
update, const Element* animatingElement, double timelineCurrentTime) |
| 613 { | 613 { |
| 614 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac
tiveAnimations() : nullptr; | 614 ActiveAnimations* activeAnimations = animatingElement ? animatingElement->ac
tiveAnimations() : nullptr; |
| 615 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau
ltStack() : nullptr; | 615 AnimationStack* animationStack = activeAnimations ? &activeAnimations->defau
ltStack() : nullptr; |
| 616 | 616 |
| 617 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> activeIn
terpolationsForTransitions; | 617 InterpolationPipelineMap activeInterpolationsForTransitions; |
| 618 if (update->newTransitions().isEmpty() && update->cancelledTransitions().isE
mpty()) { | 618 if (update->newTransitions().isEmpty() && update->cancelledTransitions().isE
mpty()) { |
| 619 activeInterpolationsForTransitions = AnimationStack::activeInterpolation
s(animationStack, 0, 0, Animation::TransitionPriority, timelineCurrentTime); | 619 activeInterpolationsForTransitions = AnimationStack::activeInterpolation
s(animationStack, 0, 0, Animation::TransitionPriority, timelineCurrentTime); |
| 620 } else { | 620 } else { |
| 621 WillBeHeapVector<RawPtrWillBeMember<InertAnimation>> newTransitions; | 621 WillBeHeapVector<RawPtrWillBeMember<InertAnimation>> newTransitions; |
| 622 for (const auto& entry : update->newTransitions()) | 622 for (const auto& entry : update->newTransitions()) |
| 623 newTransitions.append(entry.value.animation.get()); | 623 newTransitions.append(entry.value.animation.get()); |
| 624 | 624 |
| 625 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> cancelledAn
imationPlayers; | 625 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> cancelledAn
imationPlayers; |
| 626 if (!update->cancelledTransitions().isEmpty()) { | 626 if (!update->cancelledTransitions().isEmpty()) { |
| 627 ASSERT(activeAnimations); | 627 ASSERT(activeAnimations); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 visitor->trace(m_newTransitions); | 797 visitor->trace(m_newTransitions); |
| 798 visitor->trace(m_activeInterpolationsForAnimations); | 798 visitor->trace(m_activeInterpolationsForAnimations); |
| 799 visitor->trace(m_activeInterpolationsForTransitions); | 799 visitor->trace(m_activeInterpolationsForTransitions); |
| 800 visitor->trace(m_newAnimations); | 800 visitor->trace(m_newAnimations); |
| 801 visitor->trace(m_suppressedAnimationPlayers); | 801 visitor->trace(m_suppressedAnimationPlayers); |
| 802 visitor->trace(m_animationsWithUpdates); | 802 visitor->trace(m_animationsWithUpdates); |
| 803 #endif | 803 #endif |
| 804 } | 804 } |
| 805 | 805 |
| 806 } // namespace blink | 806 } // namespace blink |
| OLD | NEW |