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/animation_host.h" | 5 #include "cc/animation/animation_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 : false; | 420 : false; |
421 } | 421 } |
422 | 422 |
423 bool AnimationHost::HasAnyAnimationTargetingProperty( | 423 bool AnimationHost::HasAnyAnimationTargetingProperty( |
424 ElementId element_id, | 424 ElementId element_id, |
425 TargetProperty::Type property) const { | 425 TargetProperty::Type property) const { |
426 auto element_animations = GetElementAnimationsForElementId(element_id); | 426 auto element_animations = GetElementAnimationsForElementId(element_id); |
427 if (!element_animations) | 427 if (!element_animations) |
428 return false; | 428 return false; |
429 | 429 |
430 return !!element_animations->GetAnimation(property); | 430 return element_animations->HasAnyAnimationTargetingProperty(property); |
431 } | 431 } |
432 | 432 |
433 bool AnimationHost::HasFilterAnimationThatInflatesBounds( | 433 bool AnimationHost::HasFilterAnimationThatInflatesBounds( |
434 ElementId element_id) const { | 434 ElementId element_id) const { |
435 auto element_animations = GetElementAnimationsForElementId(element_id); | 435 auto element_animations = GetElementAnimationsForElementId(element_id); |
436 return element_animations | 436 return element_animations |
437 ? element_animations->HasFilterAnimationThatInflatesBounds() | 437 ? element_animations->HasFilterAnimationThatInflatesBounds() |
438 : false; | 438 : false; |
439 } | 439 } |
440 | 440 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 AnimationHost::active_element_animations_for_testing() const { | 568 AnimationHost::active_element_animations_for_testing() const { |
569 return active_element_to_animations_map_; | 569 return active_element_to_animations_map_; |
570 } | 570 } |
571 | 571 |
572 const AnimationHost::ElementToAnimationsMap& | 572 const AnimationHost::ElementToAnimationsMap& |
573 AnimationHost::all_element_animations_for_testing() const { | 573 AnimationHost::all_element_animations_for_testing() const { |
574 return element_to_animations_map_; | 574 return element_to_animations_map_; |
575 } | 575 } |
576 | 576 |
577 } // namespace cc | 577 } // namespace cc |
OLD | NEW |