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

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

Issue 2322693003: CC Animation: Rename has_any_animation and make implementattion out-of-line (Closed)
Patch Set: Created 4 years, 3 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 float* start_scale) const { 502 float* start_scale) const {
503 *start_scale = 0.f; 503 *start_scale = 0.f;
504 auto element_animations = GetElementAnimationsForElementId(element_id); 504 auto element_animations = GetElementAnimationsForElementId(element_id);
505 return element_animations 505 return element_animations
506 ? element_animations->AnimationStartScale(list_type, start_scale) 506 ? element_animations->AnimationStartScale(list_type, start_scale)
507 : true; 507 : true;
508 } 508 }
509 509
510 bool AnimationHost::HasAnyAnimation(ElementId element_id) const { 510 bool AnimationHost::HasAnyAnimation(ElementId element_id) const {
511 auto element_animations = GetElementAnimationsForElementId(element_id); 511 auto element_animations = GetElementAnimationsForElementId(element_id);
512 return element_animations ? element_animations->has_any_animation() : false; 512 return element_animations ? element_animations->HasAnyAnimation() : false;
513 } 513 }
514 514
515 bool AnimationHost::HasActiveAnimationForTesting(ElementId element_id) const { 515 bool AnimationHost::HasActiveAnimationForTesting(ElementId element_id) const {
516 auto element_animations = GetElementAnimationsForElementId(element_id); 516 auto element_animations = GetElementAnimationsForElementId(element_id);
517 return element_animations ? element_animations->HasActiveAnimation() : false; 517 return element_animations ? element_animations->HasActiveAnimation() : false;
518 } 518 }
519 519
520 void AnimationHost::ImplOnlyScrollAnimationCreate( 520 void AnimationHost::ImplOnlyScrollAnimationCreate(
521 ElementId element_id, 521 ElementId element_id,
522 const gfx::ScrollOffset& target_offset, 522 const gfx::ScrollOffset& target_offset,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 AnimationHost::active_element_animations_for_testing() const { 580 AnimationHost::active_element_animations_for_testing() const {
581 return active_element_to_animations_map_; 581 return active_element_to_animations_map_;
582 } 582 }
583 583
584 const AnimationHost::ElementToAnimationsMap& 584 const AnimationHost::ElementToAnimationsMap&
585 AnimationHost::all_element_animations_for_testing() const { 585 AnimationHost::all_element_animations_for_testing() const {
586 return element_to_animations_map_; 586 return element_to_animations_map_;
587 } 587 }
588 588
589 } // namespace cc 589 } // 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