OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "cc/animation/keyframed_animation_curve.h" | 7 #include "cc/animation/keyframed_animation_curve.h" |
8 #include "ui/gfx/animation/tween.h" | 8 #include "ui/gfx/animation/tween.h" |
9 #include "ui/gfx/geometry/box_f.h" | 9 #include "ui/gfx/geometry/box_f.h" |
10 | 10 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 } | 353 } |
354 | 354 |
355 bool KeyframedTransformAnimationCurve::AffectsScale() const { | 355 bool KeyframedTransformAnimationCurve::AffectsScale() const { |
356 for (size_t i = 0; i < keyframes_.size(); ++i) { | 356 for (size_t i = 0; i < keyframes_.size(); ++i) { |
357 if (keyframes_[i]->Value().AffectsScale()) | 357 if (keyframes_[i]->Value().AffectsScale()) |
358 return true; | 358 return true; |
359 } | 359 } |
360 return false; | 360 return false; |
361 } | 361 } |
362 | 362 |
| 363 bool KeyframedTransformAnimationCurve::PreservesAxisAlignment() const { |
| 364 for (size_t i = 0; i < keyframes_.size(); ++i) { |
| 365 if (!keyframes_[i]->Value().PreservesAxisAlignment()) |
| 366 return false; |
| 367 } |
| 368 return true; |
| 369 } |
| 370 |
363 bool KeyframedTransformAnimationCurve::IsTranslation() const { | 371 bool KeyframedTransformAnimationCurve::IsTranslation() const { |
364 for (size_t i = 0; i < keyframes_.size(); ++i) { | 372 for (size_t i = 0; i < keyframes_.size(); ++i) { |
365 if (!keyframes_[i]->Value().IsTranslation() && | 373 if (!keyframes_[i]->Value().IsTranslation() && |
366 !keyframes_[i]->Value().IsIdentity()) | 374 !keyframes_[i]->Value().IsIdentity()) |
367 return false; | 375 return false; |
368 } | 376 } |
369 return true; | 377 return true; |
370 } | 378 } |
371 | 379 |
372 bool KeyframedTransformAnimationCurve::MaximumTargetScale( | 380 bool KeyframedTransformAnimationCurve::MaximumTargetScale( |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { | 453 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { |
446 for (size_t i = 0; i < keyframes_.size(); ++i) { | 454 for (size_t i = 0; i < keyframes_.size(); ++i) { |
447 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { | 455 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { |
448 return true; | 456 return true; |
449 } | 457 } |
450 } | 458 } |
451 return false; | 459 return false; |
452 } | 460 } |
453 | 461 |
454 } // namespace cc | 462 } // namespace cc |
OLD | NEW |