Home
last modified time | relevance | path

Searched refs:fraction (Results 1 – 25 of 136) sorted by relevance

123456

/frameworks/base/libs/hwui/
DPropertyValuesHolder.cpp29 inline constexpr float lerp(float fromValue, float toValue, float fraction) { in lerp() argument
30 return float(fromValue * (1 - fraction) + toValue * fraction); in lerp()
39 float fraction) const { in evaluate()
40 float a = lerp(SkColorGetA(fromColor) / 255.0f, SkColorGetA(toColor) / 255.0f, fraction); in evaluate()
41 float r = lerp(linearize(SkColorGetR(fromColor)), linearize(SkColorGetR(toColor)), fraction); in evaluate()
42 float g = lerp(linearize(SkColorGetG(fromColor)), linearize(SkColorGetG(toColor)), fraction); in evaluate()
43 float b = lerp(linearize(SkColorGetB(fromColor)), linearize(SkColorGetB(toColor)), fraction); in evaluate()
50 float fraction) const { in evaluate()
51 VectorDrawableUtils::interpolatePaths(out, from, to, fraction); in evaluate()
55 const T PropertyValuesHolderImpl<T>::getValueFromData(float fraction) const { in getValueFromData()
[all …]
DPropertyValuesHolder.h33 virtual void setFraction(float fraction) = 0;
40 virtual void evaluate(T* out, const T& from, const T& to, float fraction) const {}; in evaluate() argument
47 float fraction) const override { in evaluate() argument
48 *out = from * (1 - fraction) + to * fraction; in evaluate()
55 float fraction) const override;
60 float fraction) const override;
72 const T getValueFromData(float fraction) const;
75 const T calculateAnimatedValue(float fraction) const;
95 void setFraction(float fraction) override;
111 void setFraction(float fraction) override;
[all …]
/frameworks/base/core/java/android/animation/
DKeyframe.java82 public static Keyframe ofInt(float fraction, int value) { in ofInt() argument
83 return new IntKeyframe(fraction, value); in ofInt()
98 public static Keyframe ofInt(float fraction) { in ofInt() argument
99 return new IntKeyframe(fraction); in ofInt()
114 public static Keyframe ofFloat(float fraction, float value) { in ofFloat() argument
115 return new FloatKeyframe(fraction, value); in ofFloat()
130 public static Keyframe ofFloat(float fraction) { in ofFloat() argument
131 return new FloatKeyframe(fraction); in ofFloat()
146 public static Keyframe ofObject(float fraction, Object value) { in ofObject() argument
147 return new ObjectKeyframe(fraction, value); in ofObject()
[all …]
DPathKeyframes.java66 public Object getValue(float fraction) { in getValue() argument
68 if (fraction < 0) { in getValue()
69 return interpolateInRange(fraction, 0, 1); in getValue()
70 } else if (fraction > 1) { in getValue()
71 return interpolateInRange(fraction, numPoints - 2, numPoints - 1); in getValue()
72 } else if (fraction == 0) { in getValue()
74 } else if (fraction == 1) { in getValue()
85 if (fraction < midFraction) { in getValue()
87 } else if (fraction > midFraction) { in getValue()
95 return interpolateInRange(fraction, high, low); in getValue()
[all …]
DIntKeyframeSet.java39 public Object getValue(float fraction) { in getValue() argument
40 return getIntValue(fraction); in getValue()
56 public int getIntValue(float fraction) { in getIntValue() argument
57 if (fraction <= 0f) { in getIntValue()
66 fraction = interpolator.getInterpolation(fraction); in getIntValue()
68 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getIntValue()
73 } else if (fraction >= 1f) { in getIntValue()
82 fraction = interpolator.getInterpolation(fraction); in getIntValue()
84 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getIntValue()
92 if (fraction < nextKeyframe.getFraction()) { in getIntValue()
[all …]
DFloatKeyframeSet.java39 public Object getValue(float fraction) { in getValue() argument
40 return getFloatValue(fraction); in getValue()
56 public float getFloatValue(float fraction) { in getFloatValue() argument
57 if (fraction <= 0f) { in getFloatValue()
66 fraction = interpolator.getInterpolation(fraction); in getFloatValue()
68 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getFloatValue()
73 } else if (fraction >= 1f) { in getFloatValue()
82 fraction = interpolator.getInterpolation(fraction); in getFloatValue()
84 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getFloatValue()
93 if (fraction < nextKeyframe.getFraction()) { in getFloatValue()
[all …]
DValueAnimator.java654 float fraction = mDuration > 0 ? (float) playTime / mDuration : 1; in setCurrentPlayTime() local
655 setCurrentFraction(fraction); in setCurrentPlayTime()
675 public void setCurrentFraction(float fraction) { in setCurrentFraction() argument
677 fraction = clampFraction(fraction); in setCurrentFraction()
680 long seekTime = (long) (getScaledDuration() * fraction); in setCurrentFraction()
688 mSeekFraction = fraction; in setCurrentFraction()
690 mOverallFraction = fraction; in setCurrentFraction()
691 final float currentIterationFraction = getCurrentIterationFraction(fraction, mReversing); in setCurrentFraction()
700 private int getCurrentIteration(float fraction) { in getCurrentIteration() argument
701 fraction = clampFraction(fraction); in getCurrentIteration()
[all …]
DKeyframeSet.java196 public Object getValue(float fraction) { in getValue() argument
200 fraction = mInterpolator.getInterpolation(fraction); in getValue()
202 return mEvaluator.evaluate(fraction, mFirstKeyframe.getValue(), in getValue()
205 if (fraction <= 0f) { in getValue()
209 fraction = interpolator.getInterpolation(fraction); in getValue()
212 float intervalFraction = (fraction - prevFraction) / in getValue()
216 } else if (fraction >= 1f) { in getValue()
220 fraction = interpolator.getInterpolation(fraction); in getValue()
223 float intervalFraction = (fraction - prevFraction) / in getValue()
231 if (fraction < nextKeyframe.getFraction()) { in getValue()
[all …]
DRectEvaluator.java72 public Rect evaluate(float fraction, Rect startValue, Rect endValue) { in evaluate() argument
73 int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction); in evaluate()
74 int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction); in evaluate()
75 int right = startValue.right + (int) ((endValue.right - startValue.right) * fraction); in evaluate()
76 int bottom = startValue.bottom + (int) ((endValue.bottom - startValue.bottom) * fraction); in evaluate()
DArgbEvaluator.java57 public Object evaluate(float fraction, Object startValue, Object endValue) { in evaluate() argument
80 float a = startA + fraction * (endA - startA); in evaluate()
81 float r = startR + fraction * (endR - startR); in evaluate()
82 float g = startG + fraction * (endG - startG); in evaluate()
83 float b = startB + fraction * (endB - startB); in evaluate()
DKeyframes.java54 Object getValue(float fraction); in getValue() argument
74 int getIntValue(float fraction); in getIntValue() argument
87 float getFloatValue(float fraction); in getFloatValue() argument
DPointFEvaluator.java72 public PointF evaluate(float fraction, PointF startValue, PointF endValue) { in evaluate() argument
73 float x = startValue.x + (fraction * (endValue.x - startValue.x)); in evaluate()
74 float y = startValue.y + (fraction * (endValue.y - startValue.y)); in evaluate()
/frameworks/base/core/java/android/transition/
DSlide.java61 float getGoneX(ViewGroup sceneRoot, View view, float fraction); in getGoneX() argument
64 float getGoneY(ViewGroup sceneRoot, View view, float fraction); in getGoneY() argument
70 public float getGoneY(ViewGroup sceneRoot, View view, float fraction) { in getGoneY() argument
78 public float getGoneX(ViewGroup sceneRoot, View view, float fraction) { in getGoneX() argument
85 public float getGoneX(ViewGroup sceneRoot, View view, float fraction) {
86 return view.getTranslationX() - sceneRoot.getWidth() * fraction;
92 public float getGoneX(ViewGroup sceneRoot, View view, float fraction) {
96 x = view.getTranslationX() + sceneRoot.getWidth() * fraction;
98 x = view.getTranslationX() - sceneRoot.getWidth() * fraction;
106 public float getGoneY(ViewGroup sceneRoot, View view, float fraction) {
[all …]
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/
DInterpolators.java111 public static float getNotificationScrimAlpha(float fraction, boolean forNotification) { in getNotificationScrimAlpha() argument
113 fraction = MathUtils.constrainedMap(0f, 1f, 0.3f, 1f, fraction); in getNotificationScrimAlpha()
115 fraction = MathUtils.constrainedMap(0f, 1f, 0f, 0.5f, fraction); in getNotificationScrimAlpha()
117 fraction = fraction * 1.2f - 0.2f; in getNotificationScrimAlpha()
118 if (fraction <= 0) { in getNotificationScrimAlpha()
121 final float oneMinusFrac = 1f - fraction; in getNotificationScrimAlpha()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/
DRectFEvaluator.java44 public RectF evaluate(float fraction, RectF startValue, RectF endValue) { in evaluate() argument
45 float left = startValue.left + ((endValue.left - startValue.left) * fraction); in evaluate()
46 float top = startValue.top + ((endValue.top - startValue.top) * fraction); in evaluate()
47 float right = startValue.right + ((endValue.right - startValue.right) * fraction); in evaluate()
48 float bottom = startValue.bottom + ((endValue.bottom - startValue.bottom) * fraction); in evaluate()
/frameworks/av/media/codecs/amrwb/enc/src/
Dlog2.c60 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in Log2_norm() argument
68 *fraction = 0; in Log2_norm()
81 *fraction = extract_h (L_y); in Log2_norm()
101 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in Log2() argument
107 Log2_norm ((L_x << exp), exp, exponent, fraction); in Log2()
Dpitch_f4.c79 Word32 fraction, i; in Pitch_fr4() local
122 fraction = -3; in Pitch_fr4()
126 fraction = -2; in Pitch_fr4()
130 fraction = 0; in Pitch_fr4()
132 max = Interpol_4(&corr[t0], fraction); in Pitch_fr4()
134 for (i = fraction + step; i <= 3; i += step) in Pitch_fr4()
140 fraction = i; in Pitch_fr4()
144 if (fraction < 0) in Pitch_fr4()
146 fraction += UP_SAMP; in Pitch_fr4()
149 *pit_frac = fraction; in Pitch_fr4()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/
DPipAnimationController.java479 SurfaceControl.Transaction tx, float fraction); in applySurfaceControlTransaction() argument
487 SurfaceControl.Transaction tx, float fraction) { in ofAlpha()
488 final float alpha = getStartValue() * (1 - fraction) + getEndValue() * fraction; in ofAlpha()
568 SurfaceControl.Transaction tx, float fraction) { in ofBounds() argument
573 tx.setAlpha(mContentOverlay, fraction < 0.5f ? 0 : (fraction - 0.5f) * 2); in ofBounds()
578 applyRotation(tx, leash, fraction, start, end); in ofBounds()
581 Rect bounds = mRectEvaluator.evaluate(fraction, start, end); in ofBounds()
582 float angle = (1.0f - fraction) * startingAngle; in ofBounds()
592 final Rect insets = computeInsets(fraction); in ofBounds()
608 float fraction, Rect start, Rect end) { in ofBounds() argument
[all …]
/frameworks/base/core/java/android/inputmethodservice/
DCompactExtractEditLayout.java69 private int applyFractionInt(@FractionRes int fraction, int whole) { in applyFractionInt() argument
70 return Math.round(getResources().getFraction(fraction, whole, whole)); in applyFractionInt()
90 com.android.internal.R.fraction.input_extract_layout_height, screenHeightPx)); in applyProportionalLayout()
93 applyFractionInt(com.android.internal.R.fraction.input_extract_layout_padding_left, in applyProportionalLayout()
96 applyFractionInt(com.android.internal.R.fraction.input_extract_layout_padding_right, in applyProportionalLayout()
101 applyFractionInt(com.android.internal.R.fraction.input_extract_text_margin_bottom, in applyProportionalLayout()
105 applyFractionInt(com.android.internal.R.fraction.input_extract_action_margin_bottom, in applyProportionalLayout()
/frameworks/av/media/codecs/m4v_h263/enc/src/
Dbitstream_io.cpp257 PV_STATUS BitstreamSavePartial(BitstreamEncVideo *stream, Int *fraction) in BitstreamSavePartial() argument
283 *fraction = 1; in BitstreamSavePartial()
287 *fraction = 0; in BitstreamSavePartial()
301 if (*fraction) in BitstreamSavePartial()
329 Int fraction; in BitstreamShortHeaderByteAlignStuffing() local
341 BitstreamSavePartial(stream, &fraction); in BitstreamShortHeaderByteAlignStuffing()
359 Int fraction; in BitstreamMpeg4ByteAlignStuffing() local
377 BitstreamSavePartial(stream, &fraction); in BitstreamMpeg4ByteAlignStuffing()
422 Int bitused, bitleft, offset, fraction; in BitstreamAppendEnc() local
424 status = BitstreamSavePartial(bitstream1, &fraction); in BitstreamAppendEnc()
[all …]
/frameworks/av/media/codecs/amrwb/dec/src/
Dpvamrwb_math_op.cpp386 int16 fraction /* (i) Q15 : Fractionnal part. (range: 0.0<=val<1.0) */ in power_of_2() argument
392 L_x = fraction << 5; /* L_x = fraction<<6 */ in power_of_2()
393 i = (fraction >> 10); /* Extract b10-b16 of fraction */ in power_of_2()
493 int16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in Lg2_normalized() argument
502 *fraction = 0;; in Lg2_normalized()
520 *fraction = extract_h(L_y); in Lg2_normalized()
541 int16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in amrwb_log_2() argument
547 Lg2_normalized(shl_int32(L_x, exp), exp, exponent, fraction); in amrwb_log_2()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/
DSplitScreenTransitions.java221 float fraction = animation.getAnimatedFraction(); in startExampleAnimation()
222 transaction.setAlpha(leash, start * (1.f - fraction) + end * fraction); in startExampleAnimation()
262 float fraction = animation.getAnimatedFraction(); in startExampleResizeAnimation()
264 (int) (startBounds.width() * (1.f - fraction) + endBounds.width() * fraction), in startExampleResizeAnimation()
265 (int) (startBounds.height() * (1.f - fraction) in startExampleResizeAnimation()
266 + endBounds.height() * fraction)); in startExampleResizeAnimation()
268 startBounds.left * (1.f - fraction) + endBounds.left * fraction, in startExampleResizeAnimation()
269 startBounds.top * (1.f - fraction) + endBounds.top * fraction); in startExampleResizeAnimation()
/frameworks/av/media/codecs/amrnb/common/src/
Dlog2_norm.cpp200 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in Log2_norm() argument
209 *fraction = 0; in Log2_norm()
234 *fraction = (Word16)(L_y >> 16); in Log2_norm()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/
DLegacySplitScreenTransitions.java129 float fraction = animation.getAnimatedFraction(); in startExampleAnimation()
130 transaction.setAlpha(leash, start * (1.f - fraction) + end * fraction); in startExampleAnimation()
170 float fraction = animation.getAnimatedFraction(); in startExampleResizeAnimation()
172 (int) (startBounds.width() * (1.f - fraction) + endBounds.width() * fraction), in startExampleResizeAnimation()
173 (int) (startBounds.height() * (1.f - fraction) in startExampleResizeAnimation()
174 + endBounds.height() * fraction)); in startExampleResizeAnimation()
176 startBounds.left * (1.f - fraction) + endBounds.left * fraction, in startExampleResizeAnimation()
177 startBounds.top * (1.f - fraction) + endBounds.top * fraction); in startExampleResizeAnimation()
/frameworks/base/core/java/android/net/
DSntpClient.java271 long fraction = read32(buffer, offset + 4); in readTimeStamp() local
273 if (seconds == 0 && fraction == 0) { in readTimeStamp()
276 return ((seconds - OFFSET_1900_TO_1970) * 1000) + ((fraction * 1000L) / 0x100000000L); in readTimeStamp()
300 long fraction = milliseconds * 0x100000000L / 1000L; in writeTimeStamp() local
302 buffer[offset++] = (byte)(fraction >> 24); in writeTimeStamp()
303 buffer[offset++] = (byte)(fraction >> 16); in writeTimeStamp()
304 buffer[offset++] = (byte)(fraction >> 8); in writeTimeStamp()

123456