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

Side by Side Diff: ui/compositor/transform_animation_curve_adapter.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/compositor/transform_animation_curve_adapter.h" 5 #include "ui/compositor/transform_animation_curve_adapter.h"
6 6
7 #include "cc/base/time_util.h" 7 #include "cc/base/time_util.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 bool TransformAnimationCurveAdapter::AffectsScale() const { 62 bool TransformAnimationCurveAdapter::AffectsScale() const {
63 return !initial_value_.IsIdentityOrTranslation() || 63 return !initial_value_.IsIdentityOrTranslation() ||
64 !target_value_.IsIdentityOrTranslation(); 64 !target_value_.IsIdentityOrTranslation();
65 } 65 }
66 66
67 bool TransformAnimationCurveAdapter::IsTranslation() const { 67 bool TransformAnimationCurveAdapter::IsTranslation() const {
68 return initial_value_.IsIdentityOrTranslation() && 68 return initial_value_.IsIdentityOrTranslation() &&
69 target_value_.IsIdentityOrTranslation(); 69 target_value_.IsIdentityOrTranslation();
70 } 70 }
71 71
72 bool TransformAnimationCurveAdapter::PreservesAxisAlignment() const {
73 return (initial_value_.IsIdentity() ||
74 initial_value_.IsScaleOrTranslation()) &&
75 (target_value_.IsIdentity() || target_value_.IsScaleOrTranslation());
76 }
77
72 bool TransformAnimationCurveAdapter::MaximumTargetScale( 78 bool TransformAnimationCurveAdapter::MaximumTargetScale(
73 bool forward_direction, 79 bool forward_direction,
74 float* max_scale) const { 80 float* max_scale) const {
75 return false; 81 return false;
76 } 82 }
77 83
78 InverseTransformCurveAdapter::InverseTransformCurveAdapter( 84 InverseTransformCurveAdapter::InverseTransformCurveAdapter(
79 TransformAnimationCurveAdapter base_curve, 85 TransformAnimationCurveAdapter base_curve,
80 gfx::Transform initial_value, 86 gfx::Transform initial_value,
81 base::TimeDelta duration) 87 base::TimeDelta duration)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool InverseTransformCurveAdapter::AffectsScale() const { 130 bool InverseTransformCurveAdapter::AffectsScale() const {
125 return !initial_value_.IsIdentityOrTranslation() || 131 return !initial_value_.IsIdentityOrTranslation() ||
126 base_curve_.AffectsScale(); 132 base_curve_.AffectsScale();
127 } 133 }
128 134
129 bool InverseTransformCurveAdapter::IsTranslation() const { 135 bool InverseTransformCurveAdapter::IsTranslation() const {
130 return initial_value_.IsIdentityOrTranslation() && 136 return initial_value_.IsIdentityOrTranslation() &&
131 base_curve_.IsTranslation(); 137 base_curve_.IsTranslation();
132 } 138 }
133 139
140 bool InverseTransformCurveAdapter::PreservesAxisAlignment() const {
141 return (initial_value_.IsIdentity() ||
142 initial_value_.IsScaleOrTranslation()) &&
143 (base_curve_.PreservesAxisAlignment());
144 }
145
134 bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction, 146 bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction,
135 float* max_scale) const { 147 float* max_scale) const {
136 return false; 148 return false;
137 } 149 }
138 150
139 } // namespace ui 151 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/transform_animation_curve_adapter.h ('k') | ui/events/gesture_detection/gesture_config_helper_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698