Home
last modified time | relevance | path

Searched refs:red (Results 1 – 25 of 93) sorted by relevance

1234

/cts/tests/tests/os/src/android/os/cts/
DParcelFileDescriptorProcessTest.java47 private IParcelFileDescriptorPeer red; field in ParcelFileDescriptorProcessTest
102 red = redConn.get(); in setUp()
104 red.setPeer(blue); in setUp()
105 blue.setPeer(red); in setUp()
128 red.setupReadPipe(); in testPullPipeNormal()
132 assertEquals(1, red.read()); in testPullPipeNormal()
135 assertEquals(-1, red.read()); in testPullPipeNormal()
136 assertEquals(null, red.checkError()); in testPullPipeNormal()
141 red.setupWritePipe(); in testPushPipeNormal()
142 red.doSet(); in testPushPipeNormal()
[all …]
DParcelFileDescriptorTest.java248 final ParcelFileDescriptor red = pipe[0]; in testPipeNormal() local
252 assertEquals(1, read(red)); in testPipeNormal()
255 assertEquals(-1, read(red)); in testPipeNormal()
256 red.checkError(); in testPipeNormal()
264 final ParcelFileDescriptor red = pipe[0]; in testPipeError_Discouraged() local
271 assertEquals(2, read(red)); in testPipeError_Discouraged()
272 assertEquals(-1, read(red)); in testPipeError_Discouraged()
274 red.checkError(); in testPipeError_Discouraged()
284 final ParcelFileDescriptor red = pipe[0]; in testPipeError() local
290 try (AutoCloseInputStream is = new AutoCloseInputStream(red)) { in testPipeError()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/wavelib/
DPipeShort.java98 int red = mMaxValues - front; in read() local
99 if (red > count) { in read()
100 red = count; in read()
103 System.arraycopy(mBuffer, front, buffer, offset, red); in read()
105 if (front + red == mMaxValues) { in read()
106 if ((count -= red) > front) { in read()
110 System.arraycopy(mBuffer, 0, buffer, offset + red, count); in read()
111 red += count; in read()
114 mFront += red; in read()
115 return red; in read()
/cts/hostsidetests/appsecurity/test-apps/MediaStorageApp/src/com/android/cts/mediastorageapp/
DMediaStorageTest.java177 final Uri red = create.call(); in doMediaNone() local
192 assertTrue(seen.contains(ContentUris.parseId(red))); in doMediaNone()
195 try (ParcelFileDescriptor pfd = mContentResolver.openFileDescriptor(red, "rw")) { in doMediaNone()
268 final Uri red = create.call(); in doMediaRead() local
282 assertTrue(seen.contains(ContentUris.parseId(red))); in doMediaRead()
285 try (ParcelFileDescriptor pfd = mContentResolver.openFileDescriptor(red, "rw")) { in doMediaRead()
303 final Uri red = create.call(); in doMediaWrite() local
317 assertTrue(seen.contains(ContentUris.parseId(red))); in doMediaWrite()
320 try (ParcelFileDescriptor pfd = mContentResolver.openFileDescriptor(red, "rw")) { in doMediaWrite()
343 final Uri red = create.call(); in doMediaEscalation_Open() local
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DBlendModeTest.java181 int red = (Color.red(DST_COLOR) * Color.red(Color.BLUE)) / 255; in testBlendMode_MODULATE() local
184 int resultColor = Color.argb(alpha, red, green, blue); in testBlendMode_MODULATE()
198 int redDst = Color.red(DST_COLOR); in testBlendMode_OVERLAY()
199 int redSrc = Color.red(SRC_COLOR); in testBlendMode_OVERLAY()
208 int red = computeOverlay(alphaSrc, alphaDst, redSrc, redDst); in testBlendMode_OVERLAY() local
211 int result = Color.argb(alpha, red, green, blue); in testBlendMode_OVERLAY()
229 int redDst = Color.red(DST_COLOR); in testBlendMode_DARKEN()
230 int redSrc = Color.red(SRC_COLOR); in testBlendMode_DARKEN()
239 int red = computeDarken(alphaDst, alphaSrc, redDst, redSrc); in testBlendMode_DARKEN() local
242 int result = Color.argb(alphaOut, red, green, blue); in testBlendMode_DARKEN()
[all …]
DShadowTests.java106 return Color.red(color) > Color.green(color) in testRedSpotShadow()
107 && Color.red(color) > Color.blue(color); in testRedSpotShadow()
122 return Color.red(color) > Color.green(color) in testRedAmbientShadow()
123 && Color.red(color) > Color.blue(color); in testRedAmbientShadow()
138 return Color.red(color) > Color.green(color) in testRedAmbientBlueSpotShadow()
139 && Color.blue(color) > Color.red(color); in testRedAmbientBlueSpotShadow()
/cts/tests/tests/graphics/src/android/graphics/cts/
DLinearGradientTest.java65 assertTrue(Color.red(b.getPixel(10, 15)) < Color.red(b.getPixel(10, 20))); in testLinearGradient()
66 assertTrue(Color.red(b.getPixel(10, 20)) < Color.red(b.getPixel(10, 25))); in testLinearGradient()
74 assertTrue(Color.red(b.getPixel(10, 0)) > Color.red(b.getPixel(10, 15))); in testLinearGradient()
75 assertTrue(Color.red(b.getPixel(10, 15)) > Color.red(b.getPixel(10, 30))); in testLinearGradient()
83 long red = Color.pack(1, 0, 0, 1, p3);
86 long[] colors = new long[] { blue, green, red };
103 convert.apply(red), b.getColor(0, 39), 0.08f);
115 assertTrue(b.getColor(10, 20).red() < b.getColor(10, 30).red());
116 assertTrue(b.getColor(10, 30).red() < b.getColor(10, 35).red());
118 lg = new LinearGradient(0, 0, 0, 40, red, blue, TileMode.CLAMP);
[all …]
DColor_ColorLongTest.java25 import static android.graphics.Color.red;
53 assertEquals(0.5f, red(pack(0.5f, 0.0f, 1.0f)), 0.01f); in testRed()
54 assertEquals(0.5f, red(pack(0.5f, 0.0f, 1.0f, 1.0f, p3)), 0.01f); in testRed()
135 assertEquals(1.0f, color1.red(), 0.01f); in testValueOf()
142 assertEquals(0.5f, color2.red(), 0.01f); in testValueOf()
149 assertEquals(0.5f, color3.red(), 0.01f); in testValueOf()
156 assertEquals(0.5f, color4.red(), 0.01f); in testValueOf()
164 assertEquals(0.5f, color5.red(), 0.01f); in testValueOf()
172 assertEquals(0.5f, color6.red(), 0.01f); in testValueOf()
179 assertEquals(0.5f, color7.red(), 0.01f); in testValueOf()
[all …]
DSweepGradientTest.java129 int red = (int) ((1d - delta) * Color.red(colors[i1]) + in verifyColors() local
130 delta * Color.red(colors[i2])); in verifyColors()
135 color = Color.argb(alpha, red, green, blue); in verifyColors()
142 assertEquals(Color.red(color), Color.red(pixel), tolerance); in verifyColors()
258 long red = Color.pack(1, 0, 0, 1, p3); in testColorLong() local
260 SweepGradient gradient = new SweepGradient(50, 50, red, blue); in testColorLong()
294 convert.apply(red), c, .08f); in testColorLong()
300 + toString(lastAngle), c.red() < lastColor.red()); in testColorLong()
DRadialGradientTest.java71 long red = Color.pack(1, 0, 0, 1, p3); in testColorLong() local
73 RadialGradient gradient = new RadialGradient(50, 50, 25, red, blue, TileMode.CLAMP); in testColorLong()
89 ColorUtils.verifyColor("Center color should be red!", convert.apply(red), in testColorLong()
120 + " (" + lastColor + ")", currentColor.red() < lastColor.red()); in testColorLong()
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DCompareUtils.java10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor)) in verifyPixelWithThreshold()
22 int average = Color.red(color) + Color.green(color) + Color.blue(color); in verifyPixelGrayScale()
24 return Math.abs(Color.red(color) - average) <= threshold in verifyPixelGrayScale()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/util/
DCompareUtils.java10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor)) in verifyPixelWithThreshold()
22 int average = Color.red(color) + Color.green(color) + Color.blue(color); in verifyPixelGrayScale()
24 return Math.abs(Color.red(color) - average) <= threshold in verifyPixelGrayScale()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DColorUtils.java50 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor() local
55 buildErrorString(s, red, green, blue, alpha); in verifyColor()
58 private static void buildErrorString(@NonNull String s, @Nullable String red, in buildErrorString() argument
61 for (String channel : new String[]{red, green, blue, alpha}) { in buildErrorString()
98 String red = verifyChannel("red", expected, observed, tolerance, (c) -> c.red()); in verifyColor() local
103 buildErrorString(msg, red, green, blue, alpha); in verifyColor()
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
Dpixel_format_f32.rsh7 // 1. Initially, it stores the input color (red, green, blue) and the depth
17 // the color (red, green, blue) of FocusPixel is updated and ready to be used in
21 // the color (red, green, blue) of FocusPixel is *not* changed.
27 float red;
51 float red;
Dlayered_filter_f32_helper.rsh95 result.red += weight * sharp_nbr->red;
107 result.red *= factor;
143 fuzzy.red = result.r * factor;
179 result.red += weight * sharp_nbr->red;
191 result.red *= fac;
201 p->red = 0;
221 p->red = 0;
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/
DPixelChecker.java58 final int red = scanline[offset + 0] & 0xFF; in matchesColor() local
65 && red <= expectedColor.mMaxRed in matchesColor()
66 && red >= expectedColor.mMinRed in matchesColor()
DRectChecker.java88 final int red = scanline[i + 0] & 0xFF; in validatePlaneForTarget() local
95 && red <= maxRed in validatePlaneForTarget()
96 && red >= minRed in validatePlaneForTarget()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DBlurPixelVerifier.java41 float dstRedChannel = Color.red(mDstColor); in verify()
45 float srcRedChannel = Color.red(mSrcColor); in verify()
70 double pixelRedChannel = Color.red(pixelColor); in verify()
DSamplePointWideGamutVerifier.java52 if (!floatCompare(expected.red(), actual.red(), mEps)) localSuccess = false; in verify()
/cts/tests/camera/src/android/hardware/camera2/cts/rs/
DBitmapUtils.java94 aFirstPix[0] = Color.red(aPixels[0]); in compareBitmap()
97 bFirstPix[0] = Color.red(bPixels[0]); in compareBitmap()
105 int aR = Color.red(aPix); in compareBitmap()
108 int bR = Color.red(bPix); in compareBitmap()
/cts/tests/tests/transition/src/android/transition/cts/
DChangeBoundsTest.java229 redAndGreen.red.position.width() > middleSize in waitForSizeIsMiddle()
230 && redAndGreen.red.position.height() > middleSize in waitForSizeIsMiddle()
242 redAndGreen.red.clip != null in waitForClipIsMiddle()
244 && redAndGreen.red.clip.width() > middleSize in waitForClipIsMiddle()
245 && redAndGreen.red.clip.height() > middleSize in waitForClipIsMiddle()
260 return start.red.position.top == 0 in isRestartingAnimation()
266 && Math.abs(largeSize - start.red.position.top) < errorPx; in isRestartingAnimation()
282 return start.red.clip.width() < smallSize + errorPx in isRestartingClip()
287 return start.red.clip.width() > largeSize - errorPx in isRestartingClip()
457 public final PositionAndClip red; field in ChangeBoundsTest.RedAndGreen
[all …]
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/
DPocService.java108 int red = Color.red(pixel); in onTouch() local
112 if ((red == 0xBE) && (green == 0xBE) && (blue == 0xBE)) { in onTouch()
/cts/tests/tests/media/src/android/media/cts/
DCodecUtils.java164 if (Color.red(rgb) > 128) { in readBinaryCounterFromBitmap()
223 return color.red() > 0.95 && color.green() < 0.05 && color.blue() < 0.05; in isRed()
227 return color.red() < 0.05 && color.green() > 0.95 && color.blue() < 0.05; in isGreen()
231 return color.red() < 0.05 && color.green() < 0.05 && color.blue() > 0.95; in isBlue()
235 return color.red() > 0.95 && color.green() > 0.95 && color.blue() > 0.95; in isWhite()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dintrinsic_lut.rscript19 short red[256];
26 tmp.r = red[in.r];
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/view/
DAlphaTestView.java79 float r = (float) Color.red(color1) * inverseRatio + (float) Color.red(color2) * ratio; in blendColor()

1234