Home
last modified time | relevance | path

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

12345

/cts/tests/tests/os/src/android/os/cts/
DParcelFileDescriptorProcessTest.java49 private IParcelFileDescriptorPeer red; field in ParcelFileDescriptorProcessTest
104 red = redConn.get(); in setUp()
106 red.setPeer(blue); in setUp()
107 blue.setPeer(red); in setUp()
130 red.setupReadPipe(); in testPullPipeNormal()
134 assertEquals(1, red.read()); in testPullPipeNormal()
137 assertEquals(-1, red.read()); in testPullPipeNormal()
138 assertEquals(null, red.checkError()); in testPullPipeNormal()
143 red.setupWritePipe(); in testPushPipeNormal()
144 red.doSet(); in testPushPipeNormal()
[all …]
DParcelFileDescriptorTest.java333 final ParcelFileDescriptor red = pipe[0]; in testBasicPipeNormal() local
337 assertEquals(1, read(red)); in testBasicPipeNormal()
340 assertEquals(-1, read(red)); in testBasicPipeNormal()
341 red.checkError(); in testBasicPipeNormal()
348 final ParcelFileDescriptor red = pipe[0]; in testPipeNormal() local
352 assertEquals(1, read(red)); in testPipeNormal()
355 assertEquals(-1, read(red)); in testPipeNormal()
356 red.checkError(); in testPipeNormal()
365 final ParcelFileDescriptor red = pipe[0]; in testPipeError_Discouraged() local
372 assertEquals(2, read(red)); in testPipeError_Discouraged()
[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/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/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()
269 final Uri red = create.call(); in doReadUriPermissionOnUriWithoutId_sameQueryResult() local
288 try (ParcelFileDescriptor pfd = mContentResolver.openFileDescriptor(red, "rw")) { in doReadUriPermissionOnUriWithoutId_sameQueryResult()
347 final Uri red = create.call(); in doOwningOneFileNotGrantPrefixUriPermission() local
355 assertThat(c.getLong(0)).isEqualTo(ContentUris.parseId(red)); in doOwningOneFileNotGrantPrefixUriPermission()
368 try (ParcelFileDescriptor pfd = mContentResolver.openFileDescriptor(red, "r")) { in doOwningOneFileNotGrantPrefixUriPermission()
386 try (ParcelFileDescriptor pfd = mContentResolver.openFileDescriptor(red, "rw")) { in doOwningOneFileNotGrantPrefixUriPermission()
474 final Uri red = create.call(); in doMediaRead() local
[all …]
/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/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/surfacecontrol/surfacevalidator/src/android/view/cts/surfacevalidator/
DPixelColor.java68 final float red = Color.red(color); in matchesColor() local
75 && red <= mMaxRed in matchesColor()
76 && red >= 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()
DPixelChecker.java78 final int red = scanline[offset + 0] & 0xFF; in matchesColor() local
85 && red <= expectedColor.mMaxRed in matchesColor()
86 && red >= expectedColor.mMinRed in matchesColor()
/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/camera/src/android/hardware/camera2/cts/rs/
DBitmapUtils.java68 aFirstPix[0] = Color.red(aPixels[0]); in compareBitmap()
71 bFirstPix[0] = Color.red(bPixels[0]); in compareBitmap()
79 int aR = Color.red(aPix); in compareBitmap()
82 int bR = Color.red(bPix); in compareBitmap()
/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/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/tests/tests/media/common/src/android/media/cts/
DCodecUtils.java159 if (Color.red(rgb) > 128) { in readBinaryCounterFromBitmap()
218 return color.red() > 0.95 && color.green() < 0.05 && color.blue() < 0.05; in isRed()
222 return color.red() < 0.05 && color.green() > 0.95 && color.blue() < 0.05; in isGreen()
226 return color.red() < 0.05 && color.green() < 0.05 && color.blue() > 0.95; in isBlue()
230 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()

12345