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

Side by Side Diff: ui/compositor/transform_animation_curve_adapter.cc

Issue 642983003: cc: Make PictureLayerImpl use a better choice for animated raster scale. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: animationscale: fixtest Created 6 years, 2 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
« no previous file with comments | « ui/compositor/transform_animation_curve_adapter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool TransformAnimationCurveAdapter::AffectsScale() const { 64 bool TransformAnimationCurveAdapter::AffectsScale() const {
65 return !initial_value_.IsIdentityOrTranslation() || 65 return !initial_value_.IsIdentityOrTranslation() ||
66 !target_value_.IsIdentityOrTranslation(); 66 !target_value_.IsIdentityOrTranslation();
67 } 67 }
68 68
69 bool TransformAnimationCurveAdapter::IsTranslation() const { 69 bool TransformAnimationCurveAdapter::IsTranslation() const {
70 return initial_value_.IsIdentityOrTranslation() && 70 return initial_value_.IsIdentityOrTranslation() &&
71 target_value_.IsIdentityOrTranslation(); 71 target_value_.IsIdentityOrTranslation();
72 } 72 }
73 73
74 bool TransformAnimationCurveAdapter::MaximumScale(float* max_scale) const { 74 bool TransformAnimationCurveAdapter::MaximumTargetScale(
75 bool forward_direction,
76 float* max_scale) const {
75 return false; 77 return false;
76 } 78 }
77 79
78 InverseTransformCurveAdapter::InverseTransformCurveAdapter( 80 InverseTransformCurveAdapter::InverseTransformCurveAdapter(
79 TransformAnimationCurveAdapter base_curve, 81 TransformAnimationCurveAdapter base_curve,
80 gfx::Transform initial_value, 82 gfx::Transform initial_value,
81 base::TimeDelta duration) 83 base::TimeDelta duration)
82 : base_curve_(base_curve), 84 : base_curve_(base_curve),
83 initial_value_(initial_value), 85 initial_value_(initial_value),
84 duration_(duration) { 86 duration_(duration) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 bool InverseTransformCurveAdapter::AffectsScale() const { 129 bool InverseTransformCurveAdapter::AffectsScale() const {
128 return !initial_value_.IsIdentityOrTranslation() || 130 return !initial_value_.IsIdentityOrTranslation() ||
129 base_curve_.AffectsScale(); 131 base_curve_.AffectsScale();
130 } 132 }
131 133
132 bool InverseTransformCurveAdapter::IsTranslation() const { 134 bool InverseTransformCurveAdapter::IsTranslation() const {
133 return initial_value_.IsIdentityOrTranslation() && 135 return initial_value_.IsIdentityOrTranslation() &&
134 base_curve_.IsTranslation(); 136 base_curve_.IsTranslation();
135 } 137 }
136 138
137 bool InverseTransformCurveAdapter::MaximumScale(float* max_scale) const { 139 bool InverseTransformCurveAdapter::MaximumTargetScale(bool forward_direction,
140 float* max_scale) const {
138 return false; 141 return false;
139 } 142 }
140 143
141 } // namespace ui 144 } // namespace ui
OLDNEW
« 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