Home
last modified time | relevance | path

Searched refs:amount (Results 1 – 25 of 72) sorted by relevance

123

/frameworks/rs/driver/runtime/arch/
Dclamp.c25 extern T __attribute__((overloadable)) clamp(T amount, T low, T high) { \
26 return amount < low ? low : (amount > high ? high : amount); \
46 extern T##2 __attribute__((overloadable)) clamp(T##2 amount, T##2 low, T##2 high) { \
48 r.x = amount.x < low.x ? low.x : (amount.x > high.x ? high.x : amount.x); \
49 r.y = amount.y < low.y ? low.y : (amount.y > high.y ? high.y : amount.y); \
53 extern T##3 __attribute__((overloadable)) clamp(T##3 amount, T##3 low, T##3 high) { \
55 r.x = amount.x < low.x ? low.x : (amount.x > high.x ? high.x : amount.x); \
56 r.y = amount.y < low.y ? low.y : (amount.y > high.y ? high.y : amount.y); \
57 r.z = amount.z < low.z ? low.z : (amount.z > high.z ? high.z : amount.z); \
61 extern T##4 __attribute__((overloadable)) clamp(T##4 amount, T##4 low, T##4 high) { \
[all …]
Dgeneric.c20 extern short __attribute__((overloadable, always_inline)) rsClamp(short amount, short low, short hi…
30 extern T __attribute__((overloadable)) clamp(T amount, T low, T high) { \
31 return amount < low ? low : (amount > high ? high : amount); \
34 extern T##2 __attribute__((overloadable)) clamp(T##2 amount, T##2 low, T##2 high) { \
36 r.x = amount.x < low.x ? low.x : (amount.x > high.x ? high.x : amount.x); \
37 r.y = amount.y < low.y ? low.y : (amount.y > high.y ? high.y : amount.y); \
41 extern T##3 __attribute__((overloadable)) clamp(T##3 amount, T##3 low, T##3 high) { \
43 r.x = amount.x < low.x ? low.x : (amount.x > high.x ? high.x : amount.x); \
44 r.y = amount.y < low.y ? low.y : (amount.y > high.y ? high.y : amount.y); \
45 r.z = amount.z < low.z ? low.z : (amount.z > high.z ? high.z : amount.z); \
[all …]
/frameworks/rs/cpu_ref/
DrsCpuIntrinsicInlines.h85 static inline int4 clamp(int4 amount, int low, int high) { in CVT_FUNC()
87 r.x = amount.x < low ? low : (amount.x > high ? high : amount.x); in CVT_FUNC()
88 r.y = amount.y < low ? low : (amount.y > high ? high : amount.y); in CVT_FUNC()
89 r.z = amount.z < low ? low : (amount.z > high ? high : amount.z); in CVT_FUNC()
90 r.w = amount.w < low ? low : (amount.w > high ? high : amount.w); in CVT_FUNC()
94 static inline float4 clamp(float4 amount, float low, float high) { in clamp() argument
96 r.x = amount.x < low ? low : (amount.x > high ? high : amount.x); in clamp()
97 r.y = amount.y < low ? low : (amount.y > high ? high : amount.y); in clamp()
98 r.z = amount.z < low ? low : (amount.z > high ? high : amount.z); in clamp()
99 r.w = amount.w < low ? low : (amount.w > high ? high : amount.w); in clamp()
[all …]
/frameworks/base/core/java/android/util/
DMathUtils.java40 public static int constrain(int amount, int low, int high) { in constrain() argument
41 return amount < low ? low : (amount > high ? high : amount); in constrain()
44 public static long constrain(long amount, long low, long high) { in constrain() argument
45 return amount < low ? low : (amount > high ? high : amount); in constrain()
49 public static float constrain(float amount, float low, float high) { in constrain() argument
50 return amount < low ? low : (amount > high ? high : amount); in constrain()
164 public static float lerp(float start, float stop, float amount) { in lerp() argument
165 return start + (stop - start) * amount; in lerp()
204 public static float lerpDeg(float start, float end, float amount) { in lerpDeg() argument
206 return minAngle * amount + start; in lerpDeg()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationUtils.java47 public static float interpolate(float start, float end, float amount) { in interpolate() argument
48 return start * (1.0f - amount) + end * amount; in interpolate()
51 public static int interpolateColors(int startColor, int endColor, float amount) { in interpolateColors() argument
53 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount), in interpolateColors()
54 (int) interpolate(Color.red(startColor), Color.red(endColor), amount), in interpolateColors()
55 (int) interpolate(Color.green(startColor), Color.green(endColor), amount), in interpolateColors()
56 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount)); in interpolateColors()
DNotificationWakeUpCoordinator.kt315 var amount = 1.0f in overrideDozeAmountIfBypass() variable
318 amount = 0.0f in overrideDozeAmountIfBypass()
320 setDozeAmount(amount, amount) in overrideDozeAmountIfBypass()
379 val amount = min(1.0f - mVisibilityAmount, mDozeAmount) in updateHideAmount() constant
380 mStackScrollerController.setHideAmount(linearAmount, amount) in updateHideAmount()
/frameworks/base/native/graphics/jni/
Daassetstreamadaptor.cpp83 ssize_t amount; in read() local
103 amount = newOffset - oldOffset; in read()
105 amount = AAsset_read(mAAsset, buffer, size); in read()
108 if (amount < 0) { in read()
109 amount = 0; in read()
111 return amount; in read()
/frameworks/base/libs/hwui/jni/
DUtils.cpp87 ssize_t amount; in read() local
106 amount = newOffset - oldOffset; in read()
108 amount = fAsset->read(buffer, size); in read()
111 if (amount < 0) { in read()
112 amount = 0; in read()
114 return amount; in read()
DCreateJavaOutputStreamAdaptor.cpp73 size_t amount = this->doSkip(size - amountSkipped, env); in read() local
74 if (0 == amount) { in read()
76 amount = this->doRead(&tmp, 1, env); in read()
77 if (0 == amount) { in read()
83 amountSkipped += amount; in read()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DLightRevealScrim.kt24 fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) in setRevealAmountOnScrim()
63 override fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) { in setRevealAmountOnScrim()
64 val interpolatedAmount = INTERPOLATOR.getInterpolation(amount) in setRevealAmountOnScrim()
72 amount, FADE_END_COLOR_OUT_THRESHOLD) in setRevealAmountOnScrim()
96 override fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) { in setRevealAmountOnScrim()
99 val fadeAmount = LightRevealEffect.getPercentPastThreshold(amount, 0.5f) in setRevealAmountOnScrim()
100 val radius = startRadius + ((endRadius - startRadius) * amount) in setRevealAmountOnScrim()
125 override fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) { in setRevealAmountOnScrim()
126 val interpolatedAmount = Interpolators.FAST_OUT_SLOW_IN_REVERSE.getInterpolation(amount) in setRevealAmountOnScrim()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/touch/
DOverScroll.java44 public static int dampedScroll(float amount, int max) { in dampedScroll() argument
45 if (Float.compare(amount, 0) == 0) return 0; in dampedScroll()
47 float f = amount / max; in dampedScroll()
/frameworks/base/tools/aapt2/text/
DUtf8Iterator.cpp50 void Utf8Iterator::Skip(int amount) { in Skip() argument
51 while (amount > 0 && HasNext()) { in Skip()
53 --amount; in Skip()
/frameworks/base/core/java/android/util/proto/
DEncodedBuffer.java172 public void skipRead(int amount) { in skipRead() argument
173 if (amount < 0) { in skipRead()
174 throw new RuntimeException("skipRead with negative amount=" + amount); in skipRead()
176 if (amount == 0) { in skipRead()
179 if (amount <= mChunkSize - mReadIndex) { in skipRead()
180 mReadIndex += amount; in skipRead()
182 amount -= mChunkSize - mReadIndex; in skipRead()
183 mReadIndex = amount % mChunkSize; in skipRead()
186 mReadBufIndex += (amount / mChunkSize); in skipRead()
188 mReadBufIndex += 1 + (amount / mChunkSize); in skipRead()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DTouchAnimator.java214 float amount = (fraction - mFrameWidth * (i - 1)) / mFrameWidth; in setValue() local
215 interpolate(i, amount, target); in setValue()
218 protected abstract void interpolate(int index, float amount, Object target); in interpolate() argument
240 protected void interpolate(int index, float amount, Object target) { in interpolate() argument
243 mProperty.set((T) target, firstFloat + (secondFloat - firstFloat) * amount); in interpolate()
258 protected void interpolate(int index, float amount, Object target) { in interpolate() argument
261 mProperty.set((T) target, (int) (firstFloat + (secondFloat - firstFloat) * amount)); in interpolate()
/frameworks/base/core/java/com/android/internal/widget/
DOrientationHelper.java176 public abstract void offsetChildren(int amount); in offsetChildren() argument
263 public void offsetChildren(int amount) { in createHorizontalHelper() argument
264 mLayoutManager.offsetChildrenHorizontal(amount); in createHorizontalHelper()
361 public void offsetChildren(int amount) {
362 mLayoutManager.offsetChildrenVertical(amount);
/frameworks/base/core/java/android/text/method/
DBaseMovementMethod.java466 protected boolean scrollLeft(TextView widget, Spannable buffer, int amount) { in scrollLeft() argument
470 scrollX = Math.max(scrollX - getCharacterWidth(widget) * amount, minScrollX); in scrollLeft()
487 protected boolean scrollRight(TextView widget, Spannable buffer, int amount) { in scrollRight() argument
491 scrollX = Math.min(scrollX + getCharacterWidth(widget) * amount, maxScrollX); in scrollRight()
508 protected boolean scrollUp(TextView widget, Spannable buffer, int amount) { in scrollUp() argument
518 topLine = Math.max(topLine - amount + 1, 0); in scrollUp()
535 protected boolean scrollDown(TextView widget, Spannable buffer, int amount) { in scrollDown() argument
548 bottomLine = Math.min(bottomLine + amount - 1, limit); in scrollDown()
/frameworks/base/tools/aapt/
DIndentPrinter.h13 void indent(int amount = 1) {
14 mIndent += amount;
/frameworks/base/services/core/java/com/android/server/display/
DRampAnimator.java149 final float amount = timeDelta * mRate / scale;
151 mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue);
153 mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue);
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DKeyguardUnlockAnimationController.kt262 private fun setSurfaceBehindAppearAmount(amount: Float) { in <lambda>()
270 MathUtils.clamp(amount, 0f, 1f)) in <lambda>()
281 surfaceHeight * SURFACE_BEHIND_START_TRANSLATION_Y * (1f - amount)) in <lambda>()
285 if (keyguardStateController.isSnappingKeyguardBackAfterSwipe) amount in <lambda>()
/frameworks/base/packages/SettingsLib/AppPreference/src/com/android/settingslib/widget/
DAppPreference.java61 public void setProgress(int amount) { in setProgress() argument
62 mProgress = amount; in setProgress()
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java518 public static int changeColorLightness(int baseColor, int amount) { in changeColorLightness() argument
521 result[0] = Math.max(Math.min(100, result[0] + amount), 0); in changeColorLightness()
570 public static int getShiftedColor(int color, int amount) { in getShiftedColor() argument
574 result[0] = Math.max(0, result[0] - amount); in getShiftedColor()
576 result[0] = Math.min(100, result[0] + amount); in getShiftedColor()
924 private static int constrain(int amount, int low, int high) { in constrain() argument
925 return amount < low ? low : (amount > high ? high : amount); in constrain()
928 private static float constrain(float amount, float low, float high) { in constrain() argument
929 return amount < low ? low : (amount > high ? high : amount); in constrain()
/frameworks/base/core/java/com/android/internal/graphics/
DColorUtils.java591 private static float constrain(float amount, float low, float high) { in constrain() argument
592 return amount < low ? low : (amount > high ? high : amount); in constrain()
595 private static int constrain(int amount, int low, int high) { in constrain() argument
596 return amount < low ? low : (amount > high ? high : amount); in constrain()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/
DPipPinchResizingAlgorithm.java92 private float dampedRotate(float amount) { in dampedRotate() argument
93 if (Float.compare(amount, 0) == 0) return 0; in dampedRotate()
95 float f = amount / PINCH_RESIZE_MAX_ANGLE_ROTATION; in dampedRotate()
/frameworks/base/libs/hwui/
DUvMapper.h112 static float lerp(float start, float stop, float amount) { in lerp() argument
113 return start + (stop - start) * amount; in lerp()
/frameworks/base/core/tests/batterystatstests/BatteryStatsLoadTests/src/com/android/frameworks/core/batterystatsloadtests/
DPowerMetrics.java100 private void addMetric(String metricType, MetricKind metricKind, double amount, in addMetric() argument
106 metric.value = amount; in addMetric()

123