• Robert Flack's avatar
    Remove unnecessary cc::UpdateTickingType from ElementAnimations. · cf6dd58b
    Robert Flack authored
    cc::UpdateTickingType::FORCE is only used in two circumstances:
    
    1. From ElementAnimations::InitAffectedElementTypes.
    2. From ElementAnimations::ElementRegistered.
    
    Since InitAffectedElementTypes is only called when constructing a new
    ElementAnimations, the call can be moved to the constructor such that we
    can guarantee the keyframe_effects_list_ is empty and thus remove the
    call to UpdateKeyframeEffectsTickingState(FORCE).
    
    When called from ElementRegistered, we are about to set
    has_element_in_active_list or has_element_in_pending_list which will
    result in the keyframe effect having an element in a list giving the
    same behavior that force was being used to provide. The other possible
    side effects of force seem unintentional.
    
    Change-Id: I6128793e953ad2e59fbc7657033995292c204f48
    Reviewed-on: https://chromium-review.googlesource.com/c/1469070
    Commit-Queue: Robert Flack <flackr@chromium.org>
    Reviewed-by: default avatarMajid Valipour <majidvp@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#632337}
    cf6dd58b
animation.cc 12.7 KB