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

Side by Side Diff: ui/compositor/transform_animation_curve_adapter.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 (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 namespace ui { 7 namespace ui {
8 8
9 TransformAnimationCurveAdapter::TransformAnimationCurveAdapter( 9 TransformAnimationCurveAdapter::TransformAnimationCurveAdapter(
10 gfx::Tween::Type tween_type, 10 gfx::Tween::Type tween_type,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool TransformAnimationCurveAdapter::AffectsScale() const { 60 bool TransformAnimationCurveAdapter::AffectsScale() const {
61 return !initial_value_.IsIdentityOrTranslation() || 61 return !initial_value_.IsIdentityOrTranslation() ||
62 !target_value_.IsIdentityOrTranslation(); 62 !target_value_.IsIdentityOrTranslation();
63 } 63 }
64 64
65 bool TransformAnimationCurveAdapter::IsTranslation() const { 65 bool TransformAnimationCurveAdapter::IsTranslation() const {
66 return initial_value_.IsIdentityOrTranslation() && 66 return initial_value_.IsIdentityOrTranslation() &&
67 target_value_.IsIdentityOrTranslation(); 67 target_value_.IsIdentityOrTranslation();
68 } 68 }
69 69
70 bool TransformAnimationCurveAdapter::PreservesAxisAlignment() const {
71 return (initial_value_.IsIdentity() ||
72 initial_value_.IsScaleOrTranslation()) &&
73 (target_value_.IsScaleOrTranslation());
74 }
75
70 bool TransformAnimationCurveAdapter::MaximumTargetScale( 76 bool TransformAnimationCurveAdapter::MaximumTargetScale(
71 bool forward_direction, 77 bool forward_direction,
72 float* max_scale) const { 78 float* max_scale) const {
73 return false; 79 return false;
74 } 80 }
75 81
76 InverseTransformCurveAdapter::InverseTransformCurveAdapter( 82 InverseTransformCurveAdapter::InverseTransformCurveAdapter(
77 TransformAnimationCurveAdapter base_curve, 83 TransformAnimationCurveAdapter base_curve,
78 gfx::Transform initial_value, 84 gfx::Transform initial_value,
79 base::TimeDelta duration) 85 base::TimeDelta duration)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool InverseTransformCurveAdapter::AffectsScale() const { 128 bool InverseTransformCurveAdapter::AffectsScale() const {
123 return !initial_value_.IsIdentityOrTranslation() || 129 return !initial_value_.IsIdentityOrTranslation() ||
124 base_curve_.AffectsScale(); 130 base_curve_.AffectsScale();
125 } 131 }
126 132
127 bool InverseTransformCurveAdapter::IsTranslation() const { 133 bool InverseTransformCurveAdapter::IsTranslation() const {
128 return initial_value_.IsIdentityOrTranslation() && 134 return initial_value_.IsIdentityOrTranslation() &&
129 base_curve_.IsTranslation(); 135 base_curve_.IsTranslation();
130 } 136 }
131 137
138 bool InverseTransformCurveAdapter::PreservesAxisAlignment() const {
139 return (initial_value_.IsIdentity() ||
140 initial_value_.IsScaleOrTranslation()) &&
141 (base_curve_.PreservesAxisAlignment());
142 }
143
132 bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction, 144 bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction,
133 float* max_scale) const { 145 float* max_scale) const {
134 return false; 146 return false;
135 } 147 }
136 148
137 } // namespace ui 149 } // namespace ui
OLDNEW
« cc/trees/layer_tree_host_common.cc ('K') | « ui/compositor/transform_animation_curve_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698