Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: cc/animation/animation_host.cc

Issue 2377223002: CC Animations: Rewrite unit tests to work with AnimationPlayer. (Closed)
Patch Set: Reparent. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/animation/animation_player.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/animation/animation_player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698