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

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

Issue 2388943002: cc: Delete unused AnimationCurve::AffectsScale and related code (Closed)
Patch Set: 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 | « cc/animation/element_animations.h ('k') | cc/animation/element_animations_unittest.cc » ('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/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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 while ((player = it.GetNext()) != nullptr) { 377 while ((player = it.GetNext()) != nullptr) {
378 gfx::BoxF player_bounds; 378 gfx::BoxF player_bounds;
379 bool success = player->TransformAnimationBoundsForBox(box, &player_bounds); 379 bool success = player->TransformAnimationBoundsForBox(box, &player_bounds);
380 if (!success) 380 if (!success)
381 return false; 381 return false;
382 bounds->Union(player_bounds); 382 bounds->Union(player_bounds);
383 } 383 }
384 return true; 384 return true;
385 } 385 }
386 386
387 bool ElementAnimations::HasAnimationThatAffectsScale() const {
388 ElementAnimations::PlayersList::Iterator it(players_list_.get());
389 AnimationPlayer* player;
390 while ((player = it.GetNext()) != nullptr) {
391 if (player->HasAnimationThatAffectsScale())
392 return true;
393 }
394 return false;
395 }
396
397 bool ElementAnimations::HasOnlyTranslationTransforms( 387 bool ElementAnimations::HasOnlyTranslationTransforms(
398 ElementListType list_type) const { 388 ElementListType list_type) const {
399 ElementAnimations::PlayersList::Iterator it(players_list_.get()); 389 ElementAnimations::PlayersList::Iterator it(players_list_.get());
400 AnimationPlayer* player; 390 AnimationPlayer* player;
401 while ((player = it.GetNext()) != nullptr) { 391 while ((player = it.GetNext()) != nullptr) {
402 if (!player->HasOnlyTranslationTransforms(list_type)) 392 if (!player->HasOnlyTranslationTransforms(list_type))
403 return false; 393 return false;
404 } 394 }
405 return true; 395 return true;
406 } 396 }
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 if (animation_host()) { 853 if (animation_host()) {
864 DCHECK(animation_host()->mutator_host_client()); 854 DCHECK(animation_host()->mutator_host_client());
865 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( 855 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation(
866 element_id()); 856 element_id());
867 } 857 }
868 858
869 return gfx::ScrollOffset(); 859 return gfx::ScrollOffset();
870 } 860 }
871 861
872 } // namespace cc 862 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/element_animations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698