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

Side by Side Diff: cc/animation/animation_curve.h

Issue 1076313006: Animation start scale should be considered for the raster scale (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing and Added more tests Created 5 years, 7 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 | « no previous file | cc/animation/keyframed_animation_curve.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CC_ANIMATION_ANIMATION_CURVE_H_ 5 #ifndef CC_ANIMATION_ANIMATION_CURVE_H_
6 #define CC_ANIMATION_ANIMATION_CURVE_H_ 6 #define CC_ANIMATION_ANIMATION_CURVE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Returns true if this animation affects scale. 79 // Returns true if this animation affects scale.
80 virtual bool AffectsScale() const = 0; 80 virtual bool AffectsScale() const = 0;
81 81
82 // Returns true if this animation is a translation. 82 // Returns true if this animation is a translation.
83 virtual bool IsTranslation() const = 0; 83 virtual bool IsTranslation() const = 0;
84 84
85 // Returns true if this animation preserves axis alignment. 85 // Returns true if this animation preserves axis alignment.
86 virtual bool PreservesAxisAlignment() const = 0; 86 virtual bool PreservesAxisAlignment() const = 0;
87 87
88 // Animation start scale
89 virtual bool AnimationStartScale(bool forward_direction,
90 float* start_scale) const = 0;
91
88 // Set |max_scale| to the maximum scale along any dimension at the end of 92 // Set |max_scale| to the maximum scale along any dimension at the end of
89 // intermediate animation target points (eg keyframe end points). When 93 // intermediate animation target points (eg keyframe end points). When
90 // |forward_direction| is true, the animation curve assumes it plays from 94 // |forward_direction| is true, the animation curve assumes it plays from
91 // the first keyframe to the last, otherwise it assumes the opposite. Returns 95 // the first keyframe to the last, otherwise it assumes the opposite. Returns
92 // false if the maximum scale cannot be computed. 96 // false if the maximum scale cannot be computed.
93 virtual bool MaximumTargetScale(bool forward_direction, 97 virtual bool MaximumTargetScale(bool forward_direction,
94 float* max_scale) const = 0; 98 float* max_scale) const = 0;
95 99
96 // Partial Animation implementation. 100 // Partial Animation implementation.
97 CurveType Type() const override; 101 CurveType Type() const override;
98 }; 102 };
99 103
100 class CC_EXPORT FilterAnimationCurve : public AnimationCurve { 104 class CC_EXPORT FilterAnimationCurve : public AnimationCurve {
101 public: 105 public:
102 ~FilterAnimationCurve() override {} 106 ~FilterAnimationCurve() override {}
103 107
104 virtual FilterOperations GetValue(base::TimeDelta t) const = 0; 108 virtual FilterOperations GetValue(base::TimeDelta t) const = 0;
105 virtual bool HasFilterThatMovesPixels() const = 0; 109 virtual bool HasFilterThatMovesPixels() const = 0;
106 110
107 // Partial Animation implementation. 111 // Partial Animation implementation.
108 CurveType Type() const override; 112 CurveType Type() const override;
109 }; 113 };
110 114
111 } // namespace cc 115 } // namespace cc
112 116
113 #endif // CC_ANIMATION_ANIMATION_CURVE_H_ 117 #endif // CC_ANIMATION_ANIMATION_CURVE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation/keyframed_animation_curve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698