Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/animation/element_animations.h" | 5 #include "cc/animation/element_animations.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 628 ElementAnimations::PlayersList::Iterator it(players_list_.get()); | 628 ElementAnimations::PlayersList::Iterator it(players_list_.get()); |
| 629 AnimationPlayer* player; | 629 AnimationPlayer* player; |
| 630 while ((player = it.GetNext()) != nullptr) { | 630 while ((player = it.GetNext()) != nullptr) { |
| 631 for (const auto& animation : player->animations()) { | 631 for (const auto& animation : player->animations()) { |
| 632 if (!animation->is_finished() && | 632 if (!animation->is_finished() && |
| 633 animation->target_property() == property) { | 633 animation->target_property() == property) { |
| 634 animation_state->potentially_animating_for_active_elements |= | 634 animation_state->potentially_animating_for_active_elements |= |
| 635 animation->affects_active_elements(); | 635 animation->affects_active_elements(); |
| 636 animation_state->potentially_animating_for_pending_elements |= | 636 animation_state->potentially_animating_for_pending_elements |= |
| 637 animation->affects_pending_elements(); | 637 animation->affects_pending_elements(); |
| 638 animation_state->currently_running_for_active_elements = | 638 animation_state->currently_running_for_active_elements |= |
| 639 animation_state->potentially_animating_for_active_elements && | 639 animation->affects_active_elements() && |
| 640 animation->InEffect(last_tick_time_); | 640 animation->InEffect(last_tick_time_); |
| 641 animation_state->currently_running_for_pending_elements = | 641 animation_state->currently_running_for_pending_elements |= |
| 642 animation_state->potentially_animating_for_pending_elements && | 642 animation->affects_pending_elements() && |
| 643 animation->InEffect(last_tick_time_); | 643 animation->InEffect(last_tick_time_); |
|
loyso (OOO)
2016/09/14 23:49:08
NIT: Would be nice to add a DCHECK as a loop invar
| |
| 644 } | 644 } |
| 645 } | 645 } |
| 646 } | 646 } |
| 647 | 647 |
| 648 bool potentially_animating_changed_for_active_elements = | 648 bool potentially_animating_changed_for_active_elements = |
| 649 was_potentially_animating_for_active_elements != | 649 was_potentially_animating_for_active_elements != |
| 650 animation_state->potentially_animating_for_active_elements; | 650 animation_state->potentially_animating_for_active_elements; |
| 651 bool potentially_animating_changed_for_pending_elements = | 651 bool potentially_animating_changed_for_pending_elements = |
| 652 was_potentially_animating_for_pending_elements != | 652 was_potentially_animating_for_pending_elements != |
| 653 animation_state->potentially_animating_for_pending_elements; | 653 animation_state->potentially_animating_for_pending_elements; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 863 if (animation_host()) { | 863 if (animation_host()) { |
| 864 DCHECK(animation_host()->mutator_host_client()); | 864 DCHECK(animation_host()->mutator_host_client()); |
| 865 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( | 865 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( |
| 866 element_id()); | 866 element_id()); |
| 867 } | 867 } |
| 868 | 868 |
| 869 return gfx::ScrollOffset(); | 869 return gfx::ScrollOffset(); |
| 870 } | 870 } |
| 871 | 871 |
| 872 } // namespace cc | 872 } // namespace cc |
| OLD | NEW |