| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |