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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/keyframed_animation_curve.h ('k') | cc/animation/layer_animation_controller.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « cc/animation/keyframed_animation_curve.h ('k') | cc/animation/layer_animation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698