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 "cc/animation/keyframed_animation_curve.h" | 5 #include "cc/animation/keyframed_animation_curve.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 keyframes_[i]->Value(), | 375 keyframes_[i]->Value(), |
376 min_progress, | 376 min_progress, |
377 max_progress, | 377 max_progress, |
378 &bounds_for_step)) | 378 &bounds_for_step)) |
379 return false; | 379 return false; |
380 bounds->Union(bounds_for_step); | 380 bounds->Union(bounds_for_step); |
381 } | 381 } |
382 return true; | 382 return true; |
383 } | 383 } |
384 | 384 |
385 bool KeyframedTransformAnimationCurve::AffectsScale() const { | |
386 for (size_t i = 0; i < keyframes_.size(); ++i) { | |
387 if (keyframes_[i]->Value().AffectsScale()) | |
388 return true; | |
389 } | |
390 return false; | |
391 } | |
392 | |
393 bool KeyframedTransformAnimationCurve::PreservesAxisAlignment() const { | 385 bool KeyframedTransformAnimationCurve::PreservesAxisAlignment() const { |
394 for (size_t i = 0; i < keyframes_.size(); ++i) { | 386 for (size_t i = 0; i < keyframes_.size(); ++i) { |
395 if (!keyframes_[i]->Value().PreservesAxisAlignment()) | 387 if (!keyframes_[i]->Value().PreservesAxisAlignment()) |
396 return false; | 388 return false; |
397 } | 389 } |
398 return true; | 390 return true; |
399 } | 391 } |
400 | 392 |
401 bool KeyframedTransformAnimationCurve::IsTranslation() const { | 393 bool KeyframedTransformAnimationCurve::IsTranslation() const { |
402 for (size_t i = 0; i < keyframes_.size(); ++i) { | 394 for (size_t i = 0; i < keyframes_.size(); ++i) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { | 501 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { |
510 for (size_t i = 0; i < keyframes_.size(); ++i) { | 502 for (size_t i = 0; i < keyframes_.size(); ++i) { |
511 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { | 503 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { |
512 return true; | 504 return true; |
513 } | 505 } |
514 } | 506 } |
515 return false; | 507 return false; |
516 } | 508 } |
517 | 509 |
518 } // namespace cc | 510 } // namespace cc |
OLD | NEW |