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

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

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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()) return false;
369 }
370 return true;
371 }
372
366 bool KeyframedTransformAnimationCurve::IsTranslation() const { 373 bool KeyframedTransformAnimationCurve::IsTranslation() const {
367 for (size_t i = 0; i < keyframes_.size(); ++i) { 374 for (size_t i = 0; i < keyframes_.size(); ++i) {
368 if (!keyframes_[i]->Value().IsTranslation() && 375 if (!keyframes_[i]->Value().IsTranslation() &&
369 !keyframes_[i]->Value().IsIdentity()) 376 !keyframes_[i]->Value().IsIdentity())
370 return false; 377 return false;
371 } 378 }
372 return true; 379 return true;
373 } 380 }
374 381
375 bool KeyframedTransformAnimationCurve::MaximumTargetScale( 382 bool KeyframedTransformAnimationCurve::MaximumTargetScale(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const { 455 bool KeyframedFilterAnimationCurve::HasFilterThatMovesPixels() const {
449 for (size_t i = 0; i < keyframes_.size(); ++i) { 456 for (size_t i = 0; i < keyframes_.size(); ++i) {
450 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) { 457 if (keyframes_[i]->Value().HasFilterThatMovesPixels()) {
451 return true; 458 return true;
452 } 459 }
453 } 460 }
454 return false; 461 return false;
455 } 462 }
456 463
457 } // namespace cc 464 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698