Home | History | Annotate | Download | only in hwui

Lines Matching refs:fraction

29 inline constexpr float lerp(float fromValue, float toValue, float fraction) {
30 return float(fromValue * (1 - fraction) + toValue * fraction);
39 float fraction) const {
40 float a = lerp(SkColorGetA(fromColor) / 255.0f, SkColorGetA(toColor) / 255.0f, fraction);
41 float r = lerp(linearize(SkColorGetR(fromColor)), linearize(SkColorGetR(toColor)), fraction);
42 float g = lerp(linearize(SkColorGetG(fromColor)), linearize(SkColorGetG(toColor)), fraction);
43 float b = lerp(linearize(SkColorGetB(fromColor)), linearize(SkColorGetB(toColor)), fraction);
50 float fraction) const {
51 VectorDrawableUtils::interpolatePaths(out, from, to, fraction);
55 const T PropertyValuesHolderImpl<T>::getValueFromData(float fraction) const {
60 if (fraction <= 0.0f) {
63 if (fraction >= 1.0f) {
67 fraction *= mDataSource.size() - 1;
68 int lowIndex = floor(fraction);
69 fraction -= lowIndex;
72 mEvaluator->evaluate(&value, mDataSource[lowIndex], mDataSource[lowIndex + 1], fraction);
77 const T PropertyValuesHolderImpl<T>::calculateAnimatedValue(float fraction) const {
79 return getValueFromData(fraction);
82 mEvaluator->evaluate(&value, mStartValue, mEndValue, fraction);
87 void GroupPropertyValuesHolder::setFraction(float fraction) {
88 float animatedValue = calculateAnimatedValue(fraction);
92 void FullPathColorPropertyValuesHolder::setFraction(float fraction) {
93 SkColor animatedValue = calculateAnimatedValue(fraction);
97 void FullPathPropertyValuesHolder::setFraction(float fraction) {
98 float animatedValue = calculateAnimatedValue(fraction);
102 void PathDataPropertyValuesHolder::setFraction(float fraction) {
103 mEvaluator->evaluate(&mPathData, mStartValue, mEndValue, fraction);
107 void RootAlphaPropertyValuesHolder::setFraction(float fraction) {
108 float animatedValue = calculateAnimatedValue(fraction);