Home
last modified time | relevance | path

Searched refs:color (Results 1 – 25 of 86) sorted by relevance

1234

/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRsPackColorTo8888Test.java134 private byte[] rs_PackColorTo8888(Float3 color) { in rs_PackColorTo8888() argument
135 color.x *= 255.f; in rs_PackColorTo8888()
136 color.y *= 255.f; in rs_PackColorTo8888()
137 color.z *= 255.f; in rs_PackColorTo8888()
138 color.x += 0.5f; in rs_PackColorTo8888()
139 color.y += 0.5f; in rs_PackColorTo8888()
140 color.z += 0.5f; in rs_PackColorTo8888()
142 (byte) color.x, (byte) color.y, (byte) color.z, (byte) 255 in rs_PackColorTo8888()
147 private byte[] rs_PackColorTo8888(Float4 color) { in rs_PackColorTo8888() argument
148 color.x *= 255.f; in rs_PackColorTo8888()
[all …]
Dyuv.rs63 float4 color = (float)y * 0.003921569f;
67 color += fU * yuv_U_values;
68 color += fV * yuv_V_values;
69 color = clamp(color, 0.f, 1.f);
70 return color;
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DCompareUtils.java9 public static boolean verifyPixelWithThreshold(int color, int expectedColor, int threshold) { in verifyPixelWithThreshold() argument
10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor)) in verifyPixelWithThreshold()
11 + Math.abs(Color.green(color) - Color.green(expectedColor)) in verifyPixelWithThreshold()
12 + Math.abs(Color.blue(color) - Color.blue(expectedColor)); in verifyPixelWithThreshold()
21 public static boolean verifyPixelGrayScale(int color, int threshold) { in verifyPixelGrayScale() argument
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()
25 && Math.abs(Color.green(color) - average) <= threshold in verifyPixelGrayScale()
26 && Math.abs(Color.blue(color) - average) <= threshold; in verifyPixelGrayScale()
/cts/hostsidetests/theme/src/android/theme/cts/
DColorUtils.java70 public static int a(int color) { in a() argument
71 return color >>> 24; in a()
78 public static int r(int color) { in r() argument
79 return (color >> 16) & 0xFF; in r()
86 public static int g(int color) { in g() argument
87 return (color >> 8) & 0xFF; in g()
94 public static int b(int color) { in b() argument
95 return color & 0xFF; in b()
104 public static void colorToLAB(int color, double[] outLab) { in colorToLAB() argument
105 RGBToLAB(r(color), g(color), b(color), outLab); in colorToLAB()
DComparisonTask.java73 private static int getAlphaScaledBlue(final int color) { in getAlphaScaledBlue() argument
74 return (color & 0x000000FF) * getAlpha(color) / 255; in getAlphaScaledBlue()
77 private static int getAlphaScaledGreen(final int color) { in getAlphaScaledGreen() argument
78 return ((color & 0x0000FF00) >> 8) * getAlpha(color) / 255; in getAlphaScaledGreen()
81 private static int getAlphaScaledRed(final int color) { in getAlphaScaledRed() argument
82 return ((color & 0x00FF0000) >> 16) * getAlpha(color) / 255; in getAlphaScaledRed()
85 private static int getAlpha(final int color) { in getAlpha() argument
87 return (color & 0xFF000000) >>> 24; in getAlpha()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DColorVerifier.java27 public ColorVerifier(@ColorInt int color) { in ColorVerifier() argument
28 this(color, DEFAULT_THRESHOLD); in ColorVerifier()
31 public ColorVerifier(@ColorInt int color, int colorTolerance) { in ColorVerifier() argument
33 mColor = color; in ColorVerifier()
36 public ColorVerifier(@ColorInt int color, int colorThreshold, float spatialTolerance) { in ColorVerifier() argument
38 mColor = color; in ColorVerifier()
DColorCountVerifier.java24 public ColorCountVerifier(int color, int count) { in ColorCountVerifier() argument
25 mColor = color; in ColorCountVerifier()
/cts/common/host-side/tradefed/res/report/
Dcompatibility_result.css18 color:#000;
20 color:#333;
35 background-color: rgb(212, 233, 169);
43 background-color: #A5C639;
50 border-color: gray;
58 background-color: rgb(212, 233, 169);
65 background-color: #A5C639;
77 background-color: rgb(212, 233, 169);
80 border-color: #A5C639;
89 background-color: #A5C639;
[all …]
/cts/apps/CtsVerifier/assets/report/
Dcompatibility_result.css18 color:#000;
20 color:#333;
35 background-color: rgb(212, 233, 169);
43 background-color: #A5C639;
50 border-color: gray;
58 background-color: rgb(212, 233, 169);
65 background-color: #A5C639;
77 background-color: rgb(212, 233, 169);
80 border-color: #A5C639;
89 background-color: #A5C639;
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DColor_ColorLongTest.java252 long color = pack(0.8912f, 0.4962f, 0.1164f, 1.0f, ColorSpace.get(Named.ADOBE_RGB)); in testToArgb() local
255 assertEquals(0xffff7f00, toArgb(color)); in testToArgb()
293 long color = pack(0.5f, 0.0f, 1.0f, 0.25f, p3); in testPack() local
295 assertEquals(0.5f, red(color), 0.01f); in testPack()
296 assertEquals(0.0f, green(color), 0.01f); in testPack()
297 assertEquals(1.0f, blue(color), 0.01f); in testPack()
298 assertEquals(0.25f, alpha(color), 0.01f); in testPack()
300 assertEquals(color, valueOf(0.5f, 0.0f, 1.0f, 0.25f, p3).pack()); in testPack()
365 long color = convert(0xffff8000, ColorSpace.get(Named.ADOBE_RGB)); in testConvertColorInt() local
367 assertEquals(ColorSpace.get(Named.ADOBE_RGB), colorSpace(color)); in testConvertColorInt()
[all …]
DSweepGradientTest.java105 int color; in verifyColors() local
113 color = colors[0]; in verifyColors()
116 color = colors[positions.length - 1]; in verifyColors()
130 color = Color.argb(alpha, red, green, blue); in verifyColors()
136 assertEquals(Color.alpha(color), Color.alpha(pixel), tolerance); in verifyColors()
137 assertEquals(Color.red(color), Color.red(pixel), tolerance); in verifyColors()
138 assertEquals(Color.green(color), Color.green(pixel), tolerance); in verifyColors()
139 assertEquals(Color.blue(color), Color.blue(pixel), tolerance); in verifyColors()
143 + Integer.toHexString(color)); in verifyColors()
DBlurMaskFilterTest.java68 private void verifyQuadrants(int color, Bitmap bitmap, int x, int y, int alphaTolerance) { in verifyQuadrants() argument
72 verifyColor(color, bitmap.getPixel(x, y), alphaTolerance); in verifyQuadrants()
73 verifyColor(color, bitmap.getPixel(right - x, y), alphaTolerance); in verifyQuadrants()
74 verifyColor(color, bitmap.getPixel(x, bottom - y), alphaTolerance); in verifyQuadrants()
75 verifyColor(color, bitmap.getPixel(right - x, bottom - y), alphaTolerance); in verifyQuadrants()
DPaintFlagsDrawFilterTest.java171 int color = bitmap.getPixel(i, j); in verifyContainsNonBW() local
172 if (color != Color.BLACK && color != Color.WHITE) { in verifyContainsNonBW()
187 int color = bitmap.getPixel(i, j); in verifyContainsOnlyBlackAndWhite() local
188 assertTrue(color == Color.BLACK || color == Color.WHITE); in verifyContainsOnlyBlackAndWhite()
/cts/tests/tests/view/src/android/view/cts/
DTextureViewTest.java87 int color = waitForChange(center, Color.WHITE); in testFirstFrames() local
88 assertEquals(Color.GREEN, color); in testFirstFrames()
92 color = waitForChange(center, color); in testFirstFrames()
93 assertEquals(Color.BLUE, color); in testFirstFrames()
103 private void waitForColor(Point point, int color) in waitForColor() argument
107 if (pixel == color) { in waitForColor()
115 private int waitForChange(Point point, int color) in waitForChange() argument
119 if (pixel != color) { in waitForChange()
DPixelCopyGLProducerCtsActivity.java87 private void clearColor(int color) { in clearColor() argument
88 glClearColor(Color.red(color) / 255.0f, in clearColor()
89 Color.green(color) / 255.0f, in clearColor()
90 Color.blue(color) / 255.0f, in clearColor()
91 Color.alpha(color) / 255.0f); in clearColor()
/cts/tests/tests/media/src/android/media/cts/
DRemoteVirtualDisplayService.java67 int color = data.readInt(); in onCreate()
68 render(color); in onCreate()
103 private void render(int color) { in render() argument
105 Log.i(TAG, "render " + Integer.toHexString(color)); in render()
107 mPresentation.doRendering(color); in render()
160 public void doRendering(final int color) { in doRendering() argument
164 mPresentation.doRendering(color); in doRendering()
190 public void doRendering(int color) { in doRendering() argument
191 mImageView.setImageDrawable(new ColorDrawable(color)); in doRendering()
/cts/tests/tests/widget/src/android/widget/cts/util/
DTestUtils.java129 @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) { in assertAllPixelsOfColor() argument
132 color, allowedComponentVariance, throwExceptionIfFails); in assertAllPixelsOfColor()
145 @NonNull Rect region, @ColorInt int color, int allowedComponentVariance, in assertRegionPixelsOfColor() argument
159 color, allowedComponentVariance, throwExceptionIfFails); in assertRegionPixelsOfColor()
175 int drawableWidth, int drawableHeight, boolean callSetBounds, @ColorInt int color, in assertAllPixelsOfColor() argument
195 new Rect(0, 0, drawableWidth, drawableHeight), color, in assertAllPixelsOfColor()
212 @NonNull Rect region, @ColorInt int color, int allowedComponentVariance, in assertAllPixelsOfColor() argument
227 if (!areColorsTheSameWithTolerance(color, colorAtCurrPixel, in assertAllPixelsOfColor()
232 + ", b=" + endRow + "] to be " + formatColorToHex(color) in assertAllPixelsOfColor()
255 @ColorInt int color, in assertCenterPixelOfColor() argument
[all …]
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/presenter/
DCardPresenter.java41 sDefaultBackgroundColor = parent.getResources().getColor(R.color.default_background, null); in onCreateViewHolder()
43 parent.getResources().getColor(R.color.selected_background, null); in onCreateViewHolder()
61 int color = selected ? sSelectedBackgroundColor : sDefaultBackgroundColor; in updateCardBackgroundColor() local
64 view.setBackgroundColor(color); in updateCardBackgroundColor()
65 view.findViewById(R.id.info_field).setBackgroundColor(color); in updateCardBackgroundColor()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DOrganizationInfoTest.java45 for (int color : colors) { in testSetOrganizationColor()
46 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, color); in testSetOrganizationColor()
47 assertEquals(color | 0xFF000000 /* opacity always enforced to 100% */, in testSetOrganizationColor()
64 int color = mDevicePolicyManager.getOrganizationColor(null); in testSetOrGetOrganizationColorWithNullAdminFails() local
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java67 int[] color = new int[] {1, 2, 3}; in testConstructor() local
70 new GradientDrawable(GradientDrawable.Orientation.BL_TR, color); in testConstructor()
165 private void helpTestSetStroke(int width, int color) { in helpTestSetStroke() argument
167 gradientDrawable.setStroke(width, color); in helpTestSetStroke()
178 private void verifySetStroke_WidthGap(int width, int color, in verifySetStroke_WidthGap() argument
181 gradientDrawable.setStroke(width, color, dashWidth, dashGap); in verifySetStroke_WidthGap()
323 int color; in testSetColor() local
325 color = Color.RED; in testSetColor()
326 gradientDrawable.setColor(color); in testSetColor()
327 assertEquals("Color was set to " + color, color, in testSetColor()
[all …]
/cts/apps/CtsVerifier/include/colorchecker/
Dimagetesthandler.h41 void drawPoint(const Vec2i &point, const Vec3i &color);
42 void drawPoint(int row, int column, const Vec3i &color);
43 void drawLine(int angle, int radius, const Vec3i &color);
/cts/tests/tests/print/src/android/print/cts/
DPageRangeAdjustAndVerify.java231 int color; in adjustPageRangeAndVerifyPages()
234 color = 0xffff0000; in adjustPageRangeAndVerifyPages()
237 color = 0xff00ff00; in adjustPageRangeAndVerifyPages()
240 color = 0xff0000ff; in adjustPageRangeAndVerifyPages()
243 color = 0xffffffff; in adjustPageRangeAndVerifyPages()
247 assertEquals(mSelectedPages[i] + "@" + i, color, in adjustPageRangeAndVerifyPages()
315 int color = 0xffffffff; in adjustPageRangeAndVerifyPages()
317 color = 0xffff0000; in adjustPageRangeAndVerifyPages()
319 color = 0xff00ff00; in adjustPageRangeAndVerifyPages()
321 color = 0xff0000ff; in adjustPageRangeAndVerifyPages()
[all …]
/cts/tests/tests/display/src/android/display/cts/
DVirtualDisplayTest.java230 final int color, final int windowType, final int windowFlags) { in assertDisplayCanShowPresentation() argument
233 mImageListener.getColor() != color); in assertDisplayCanShowPresentation()
242 color, windowType, windowFlags); in assertDisplayCanShowPresentation()
249 mImageListener.waitForColor(color, TIMEOUT)); in assertDisplayCanShowPresentation()
296 int color, int windowType, int windowFlags) { in TestPresentation() argument
298 mColor = color; in TestPresentation()
333 public boolean waitForColor(int color, long timeoutMillis) { in waitForColor() argument
336 while (mColor != color) { in waitForColor()
364 int color = scanImage(image); in onImageAvailable() local
366 if (mColor != color) { in onImageAvailable()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DShadowTests.java40 protected boolean verifyPixel(int color, int expectedColor) { in verifyPixel() argument
41 return super.verifyPixel(color, expectedColor) in verifyPixel()
42 && CompareUtils.verifyPixelGrayScale(color, 1); in verifyPixel()
/cts/tests/openglperf2/assets/fragment/
Dblur31 vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
34 color += texture2D(u_Texture, coords) * weights[i];
36 gl_FragColor = color;

1234