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

Unified Diff: cc/animation/layer_animation_controller.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/layer_animation_controller.h ('k') | cc/animation/layer_animation_event_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/layer_animation_controller.cc
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index c9d81cf0e9d29249993b44f26846aaec709b5f3e..1f9e11294f94b84848ead16391e6c57b692c9b6d 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -501,6 +501,21 @@ bool LayerAnimationController::HasOnlyTranslationTransforms() const {
return true;
}
+bool LayerAnimationController::AnimationsPreserveAxisAlignment() const {
+ for (size_t i = 0; i < animations_.size(); ++i) {
+ if (animations_[i]->is_finished() ||
+ animations_[i]->target_property() != Animation::Transform)
+ continue;
+
+ const TransformAnimationCurve* transform_animation_curve =
+ animations_[i]->curve()->ToTransformAnimationCurve();
+ if (!transform_animation_curve->PreservesAxisAlignment())
+ return false;
+ }
+
+ return true;
+}
+
bool LayerAnimationController::MaximumTargetScale(float* max_scale) const {
*max_scale = 0.f;
for (size_t i = 0; i < animations_.size(); ++i) {
« no previous file with comments | « cc/animation/layer_animation_controller.h ('k') | cc/animation/layer_animation_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698