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

Unified 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: Rebase 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 | « ui/compositor/transform_animation_curve_adapter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/transform_animation_curve_adapter.cc
diff --git a/ui/compositor/transform_animation_curve_adapter.cc b/ui/compositor/transform_animation_curve_adapter.cc
index 1b67ca20860ece67a378dc31972dc05da680fa83..0f697e0bad29ba1c2d432c5bf0b03b10756d5363 100644
--- a/ui/compositor/transform_animation_curve_adapter.cc
+++ b/ui/compositor/transform_animation_curve_adapter.cc
@@ -69,6 +69,12 @@ bool TransformAnimationCurveAdapter::IsTranslation() const {
target_value_.IsIdentityOrTranslation();
}
+bool TransformAnimationCurveAdapter::PreservesAxisAlignment() const {
+ return (initial_value_.IsIdentity() ||
+ initial_value_.IsScaleOrTranslation()) &&
+ (target_value_.IsIdentity() || target_value_.IsScaleOrTranslation());
+}
+
bool TransformAnimationCurveAdapter::MaximumTargetScale(
bool forward_direction,
float* max_scale) const {
@@ -131,6 +137,12 @@ bool InverseTransformCurveAdapter::IsTranslation() const {
base_curve_.IsTranslation();
}
+bool InverseTransformCurveAdapter::PreservesAxisAlignment() const {
+ return (initial_value_.IsIdentity() ||
+ initial_value_.IsScaleOrTranslation()) &&
+ (base_curve_.PreservesAxisAlignment());
+}
+
bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction,
float* max_scale) const {
return false;
« no previous file with comments | « 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