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 "cc/base/time_util.h" | 8 #include "cc/base/time_util.h" |
9 #include "ui/gfx/animation/tween.h" | 9 #include "ui/gfx/animation/tween.h" |
10 #include "ui/gfx/geometry/box_f.h" | 10 #include "ui/gfx/geometry/box_f.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 } | 356 } |
357 | 357 |
358 bool KeyframedTransformAnimationCurve::AffectsScale() const { | 358 bool KeyframedTransformAnimationCurve::AffectsScale() const { |
359 for (size_t i = 0; i < keyframes_.size(); ++i) { | 359 for (size_t i = 0; i < keyframes_.size(); ++i) { |
360 if (keyframes_[i]->Value().AffectsScale()) | 360 if (keyframes_[i]->Value().AffectsScale()) |
361 return true; | 361 return true; |
362 } | 362 } |
363 return false; | 363 return false; |
364 } | 364 } |
365 | 365 |
| 366 bool KeyframedTransformAnimationCurve::PreservesAxisAlignment() const { |
| 367 for (size_t i = 0; i < keyframes_.size(); ++i) { |
| 368 if (!keyframes_[i]->Value().PreservesAxisAlignment()) |
| 369 return false; |
| 370 } |
| 371 return true; |
| 372 } |
| 373 |
366 bool KeyframedTransformAnimationCurve::IsTranslation() const { | 374 bool KeyframedTransformAnimationCurve::IsTranslation() const { |
367 for (size_t i = 0; i < keyframes_.size(); ++i) { | 375 for (size_t i = 0; i < keyframes_.size(); ++i) { |
368 if (!keyframes_[i]->Value().IsTranslation() && | 376 if (!keyframes_[i]->Value().IsTranslation() && |
369 !keyframes_[i]->Value().IsIdentity()) | 377 !keyframes_[i]->Value().IsIdentity()) |
370 return false; | 378 return false; |
371 } | 379 } |
372 return true; | 380 return true; |
373 } | 381 } |
374 | 382 |
375 bool KeyframedTransformAnimationCurve::MaximumTargetScale( | 383 bool KeyframedTransformAnimationCurve::MaximumTargetScale( |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { | 456 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { |
449 for (size_t i = 0; i < keyframes_.size(); ++i) { | 457 for (size_t i = 0; i < keyframes_.size(); ++i) { |
450 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { | 458 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { |
451 return true; | 459 return true; |
452 } | 460 } |
453 } | 461 } |
454 return false; | 462 return false; |
455 } | 463 } |
456 | 464 |
457 } // namespace cc | 465 } // namespace cc |
OLD | NEW |