| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |