Searched refs:amount (Results 1 - 25 of 45) sorted by relevance

12

/frameworks/rs/driver/runtime/arch/
H A 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
[all...]
H A Dgeneric.c20 extern short __attribute__((overloadable, always_inline)) rsClamp(short amount, short low, short high);
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
[all...]
/frameworks/rs/cpu_ref/
H A DrsCpuIntrinsicInlines.h85 static inline int4 clamp(int4 amount, int low, int high) { argument
87 r.x = amount.x < low ? low : (amount.x > high ? high : amount.x);
88 r.y = amount.y < low ? low : (amount.y > high ? high : amount.y);
89 r.z = amount.z < low ? low : (amount.z > high ? high : amount
94 clamp(float4 amount, float low, float high) argument
103 clamp(int2 amount, int low, int high) argument
110 clamp(float2 amount, float low, float high) argument
117 clamp(int amount, int low, int high) argument
121 clamp(float amount, float low, float high) argument
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/touch/
H A DOverScroll.java40 * @param amount The original amount overscrolled.
41 * @param max The maximum amount that the View can overscroll.
42 * @return The dampened overscroll amount.
44 public static int dampedScroll(float amount, int max) { argument
45 if (Float.compare(amount, 0) == 0) return 0;
47 float f = amount / max;
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
H A DNotificationUtils.java46 public static float interpolate(float start, float end, float amount) { argument
47 return start * (1.0f - amount) + end * amount;
50 public static int interpolateColors(int startColor, int endColor, float amount) { argument
52 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount),
53 (int) interpolate(Color.red(startColor), Color.red(endColor), amount),
54 (int) interpolate(Color.green(startColor), Color.green(endColor), amount),
55 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount));
/frameworks/base/tools/aapt2/text/
H A DUtf8Iterator.cpp50 void Utf8Iterator::Skip(int amount) { argument
51 while (amount > 0 && HasNext()) {
53 --amount;
H A DUtf8Iterator.h36 void Skip(int amount);
/frameworks/base/core/java/android/util/
H A DMathUtils.java35 public static int constrain(int amount, int low, int high) { argument
36 return amount < low ? low : (amount > high ? high : amount);
39 public static long constrain(long amount, long low, long high) { argument
40 return amount < low ? low : (amount > high ? high : amount);
43 public static float constrain(float amount, float low, float high) { argument
44 return amount < lo
156 lerp(float start, float stop, float amount) argument
176 lerpDeg(float start, float end, float amount) argument
[all...]
/frameworks/base/core/jni/android/graphics/
H A DUtils.cpp85 ssize_t amount; local
92 // we want to return amount that was skipped
104 amount = newOffset - oldOffset;
106 amount = fAsset->read(buffer, size);
109 if (amount < 0) {
110 amount = 0;
112 return amount;
H A DCreateJavaOutputStreamAdaptor.cpp72 size_t amount = this->doSkip(size - amountSkipped, env); variable
73 if (0 == amount) {
75 amount = this->doRead(&tmp, 1, env);
76 if (0 == amount) {
82 amountSkipped += amount;
/frameworks/base/libs/hwui/
H A DGradientCache.cpp188 void GradientCache::mixBytes(const FloatColor& start, const FloatColor& end, float amount, argument
190 float oppAmount = 1.0f - amount;
191 float a = start.a * oppAmount + end.a * amount;
192 *dst++ = uint8_t(OECF(start.r * oppAmount + end.r * amount) * 255.0f);
193 *dst++ = uint8_t(OECF(start.g * oppAmount + end.g * amount) * 255.0f);
194 *dst++ = uint8_t(OECF(start.b * oppAmount + end.b * amount) * 255.0f);
198 void GradientCache::mixFloats(const FloatColor& start, const FloatColor& end, float amount, argument
200 float oppAmount = 1.0f - amount;
201 float a = start.a * oppAmount + end.a * amount;
205 *d++ = (start.r * oppAmount + end.r * amount);
254 float amount = (pos - startPos) / distance; local
[all...]
H A DUvMapper.h112 static float lerp(float start, float stop, float amount) { argument
113 return start + (stop - start) * amount;
H A DCaches.cpp145 uint32_t Caches::getOverdrawColor(uint32_t amount) const {
148 if (amount < 1) amount = 1;
149 if (amount > 4) amount = 4;
152 return sOverdrawColors[overdrawColorIndex][amount - 1];
H A DGradientCache.h154 float amount, uint8_t*& dst) const;
156 void mixBytes(const FloatColor& start, const FloatColor& end, float amount,
158 void mixFloats(const FloatColor& start, const FloatColor& end, float amount,
/frameworks/base/tools/aapt/
H A DIndentPrinter.h13 void indent(int amount = 1) {
14 mIndent += amount;
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
H A DTouchAnimator.java28 * but can have a float input as to the amount they should be in effect. This allows
213 float amount = (fraction - mFrameWidth * (i - 1)) / mFrameWidth;
214 interpolate(i, amount, target);
217 protected abstract void interpolate(int index, float amount, Object target); argument
239 protected void interpolate(int index, float amount, Object target) { argument
242 mProperty.set((T) target, firstFloat + (secondFloat - firstFloat) * amount);
257 protected void interpolate(int index, float amount, Object target) { argument
260 mProperty.set((T) target, (int) (firstFloat + (secondFloat - firstFloat) * amount));
/frameworks/base/services/core/java/com/android/server/display/
H A DRampAnimator.java148 final float amount = timeDelta * mRate / scale;
150 mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue);
152 mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue);
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/os/
H A DHandlerTest.kt113 private fun Handler.await(amount: Long, unit: TimeUnit) {
115 postDelayed(latch::countDown, unit.toMillis(amount))
118 val wait = unit.toMillis(amount) + SECONDS.toMillis(1)
/frameworks/base/core/java/android/util/proto/
H A DEncodedBuffer.java85 * The amount of data in the last buffer.
164 public void skipRead(int amount) { argument
165 if (amount < 0) {
166 throw new RuntimeException("skipRead with negative amount=" + amount);
168 if (amount == 0) {
171 if (amount <= mChunkSize - mReadIndex) {
172 mReadIndex += amount;
174 amount -= mChunkSize - mReadIndex;
175 mReadIndex = amount
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DOrientationHelper.java172 * Offsets all children's positions by the given amount.
174 * @param amount Value to add to each child's layout parameters
176 public abstract void offsetChildren(int amount); argument
190 * @param offset offset amount
263 public void offsetChildren(int amount) {
264 mLayoutManager.offsetChildrenHorizontal(amount);
361 public void offsetChildren(int amount) {
362 mLayoutManager.offsetChildrenVertical(amount);
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/
H A DOrientationHelper.java179 * Offsets all children's positions by the given amount.
181 * @param amount Value to add to each child's layout parameters
183 public abstract void offsetChildren(int amount); argument
197 * @param offset offset amount
270 public void offsetChildren(int amount) {
271 mLayoutManager.offsetChildrenHorizontal(amount);
368 public void offsetChildren(int amount) {
369 mLayoutManager.offsetChildrenVertical(amount);
/frameworks/base/core/java/android/text/method/
H A DBaseMovementMethod.java462 * @param amount The number of characters to scroll by. Must be at least 1.
466 protected boolean scrollLeft(TextView widget, Spannable buffer, int amount) { argument
470 scrollX = Math.max(scrollX - getCharacterWidth(widget) * amount, minScrollX);
483 * @param amount The number of characters to scroll by. Must be at least 1.
487 protected boolean scrollRight(TextView widget, Spannable buffer, int amount) { argument
491 scrollX = Math.min(scrollX + getCharacterWidth(widget) * amount, maxScrollX);
504 * @param amount The number of lines to scroll by. Must be at least 1.
508 protected boolean scrollUp(TextView widget, Spannable buffer, int amount) { argument
518 topLine = Math.max(topLine - amount + 1, 0);
531 * @param amount Th
535 scrollDown(TextView widget, Spannable buffer, int amount) argument
[all...]
/frameworks/base/core/java/com/android/internal/util/
H A DNotificationColorUtil.java510 * @param amount the amount to lighten the color from 0 to 100. This corresponds to the L
515 public static int changeColorLightness(int baseColor, int amount) { argument
518 result[0] = Math.max(Math.min(100, result[0] + amount), 0);
576 * amount.
580 * @param amount the amount from 1 to 100 how much to modify the color
583 public static int getShiftedColor(int color, int amount) { argument
587 result[0] = Math.max(0, result[0] - amount);
589 result[0] = Math.min(100, result[0] + amount);
910 constrain(int amount, int low, int high) argument
914 constrain(float amount, float low, float high) argument
[all...]
/frameworks/base/core/java/com/android/internal/graphics/
H A DColorUtils.java560 private static float constrain(float amount, float low, float high) { argument
561 return amount < low ? low : (amount > high ? high : amount);
564 private static int constrain(int amount, int low, int high) { argument
565 return amount < low ? low : (amount > high ? high : amount);
/frameworks/support/compat/src/main/java/androidx/core/graphics/
H A DColorUtils.java584 private static float constrain(float amount, float low, float high) { argument
585 return amount < low ? low : (amount > high ? high : amount);
588 private static int constrain(int amount, int low, int high) { argument
589 return amount < low ? low : (amount > high ? high : amount);

Completed in 858 milliseconds

12