Home
last modified time | relevance | path

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

1234

/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRsPackColorTo8888Test.java122 private byte[] rs_PackColorTo8888(Float3 color) { in rs_PackColorTo8888() argument
123 color.x *= 255.f; in rs_PackColorTo8888()
124 color.y *= 255.f; in rs_PackColorTo8888()
125 color.z *= 255.f; in rs_PackColorTo8888()
126 color.x += 0.5f; in rs_PackColorTo8888()
127 color.y += 0.5f; in rs_PackColorTo8888()
128 color.z += 0.5f; in rs_PackColorTo8888()
130 (byte) color.x, (byte) color.y, (byte) color.z, (byte) 255 in rs_PackColorTo8888()
135 private byte[] rs_PackColorTo8888(Float4 color) { in rs_PackColorTo8888() argument
136 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/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()
/cts/tools/tradefed-host/res/report/
Dcts_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/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/tests/tests/view/src/android/view/cts/
DTextureViewTest.java80 int color; in testFirstFrames() local
81 color = waitForChange(center, Color.WHITE); in testFirstFrames()
82 assertEquals(Color.GREEN, color); in testFirstFrames()
86 color = waitForChange(center, color); in testFirstFrames()
87 assertEquals(Color.BLUE, color); in testFirstFrames()
97 private void waitForColor(Point point, int color) in waitForColor() argument
101 if (pixel == color) { in waitForColor()
109 private int waitForChange(Point point, int color) in waitForChange() argument
113 if (pixel != color) { in waitForChange()
/cts/hostsidetests/theme/src/android/theme/cts/
DComparisonTask.java76 private static int getAlphaScaledBlue(final int color) { in getAlphaScaledBlue() argument
77 return (color & 0x000000FF) * getAlpha(color) / 255; in getAlphaScaledBlue()
80 private static int getAlphaScaledGreen(final int color) { in getAlphaScaledGreen() argument
81 return ((color & 0x0000FF00) >> 8) * getAlpha(color) / 255; in getAlphaScaledGreen()
84 private static int getAlphaScaledRed(final int color) { in getAlphaScaledRed() argument
85 return ((color & 0x00FF0000) >> 16) * getAlpha(color) / 255; in getAlphaScaledRed()
88 private static int getAlpha(final int color) { in getAlpha() argument
90 return (color & 0xFF000000) >>> 24; in getAlpha()
/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/graphics/src/android/graphics/cts/
DSweepGradientTest.java93 int color; in checkColors() local
101 color = colors[0]; in checkColors()
104 color = colors[positions.length - 1]; in checkColors()
118 color = Color.argb(alpha, red, green, blue); in checkColors()
124 assertEquals(Color.alpha(color), Color.alpha(pixel), tolerance); in checkColors()
125 assertEquals(Color.red(color), Color.red(pixel), tolerance); in checkColors()
126 assertEquals(Color.green(color), Color.green(pixel), tolerance); in checkColors()
127 assertEquals(Color.blue(color), Color.blue(pixel), tolerance); in checkColors()
134 System.out.println(Integer.toHexString(color)); in checkColors()
DBlurMaskFilterTest.java62 private void checkQuadrants(int color, Bitmap bitmap, int x, int y, int alphaTolerance) { in checkQuadrants() argument
66 checkColor(color, bitmap.getPixel(x, y), alphaTolerance); in checkQuadrants()
67 checkColor(color, bitmap.getPixel(right - x, y), alphaTolerance); in checkQuadrants()
68 checkColor(color, bitmap.getPixel(x, bottom - y), alphaTolerance); in checkQuadrants()
69 checkColor(color, bitmap.getPixel(right - x, bottom - y), alphaTolerance); in checkQuadrants()
DPaintFlagsDrawFilterTest.java167 int color = bitmap.getPixel(i, j); in assertContainsNonBW() local
168 if (color != Color.BLACK && color != Color.WHITE) { in assertContainsNonBW()
183 int color = bitmap.getPixel(i, j); in assertContainsOnlyBlackAndWhite() local
184 assertTrue(color == Color.BLACK || color == Color.WHITE); in assertContainsOnlyBlackAndWhite()
/cts/tests/tests/widget/src/android/widget/cts/util/
DTestUtils.java111 @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) { in assertAllPixelsOfColor() argument
122 color, allowedComponentVariance, throwExceptionIfFails); in assertAllPixelsOfColor()
137 int drawableWidth, int drawableHeight, boolean callSetBounds, @ColorInt int color, in assertAllPixelsOfColor() argument
152 assertAllPixelsOfColor(failMessagePrefix, bitmap, drawableWidth, drawableHeight, color, in assertAllPixelsOfColor()
168 int bitmapWidth, int bitmapHeight, @ColorInt int color, in assertAllPixelsOfColor() argument
179 int expectedAlpha = Color.alpha(color); in assertAllPixelsOfColor()
180 int expectedRed = Color.red(color); in assertAllPixelsOfColor()
181 int expectedGreen = Color.green(color); in assertAllPixelsOfColor()
182 int expectedBlue = Color.blue(color); in assertAllPixelsOfColor()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java49 int[] color = new int[] {1, 2, 3}; in testConstructor() local
52 new GradientDrawable(GradientDrawable.Orientation.BL_TR, color); in testConstructor()
133 private void helpTestSetStroke(int width, int color) { in helpTestSetStroke() argument
135 gradientDrawable.setStroke(width, color); in helpTestSetStroke()
146 private void helpTestSetStroke_WidthGap(int width, int color, in helpTestSetStroke_WidthGap() argument
149 gradientDrawable.setStroke(width, color, dashWidth, dashGap); in helpTestSetStroke_WidthGap()
291 int color; in testSetColor() local
293 color = Color.RED; in testSetColor()
294 gradientDrawable.setColor(color); in testSetColor()
295 assertEquals("Color was set to " + color, color, in testSetColor()
[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/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/widget/src/android/widget/cts/
DCalendarViewTest.java145 assertEquals(mActivity.getColor(R.color.calendarview_week_background), in testAppearanceHolo()
147 assertEquals(mActivity.getColor(R.color.calendarview_focusedmonthdate), in testAppearanceHolo()
149 assertEquals(mActivity.getColor(R.color.calendarview_unfocusedmonthdate), in testAppearanceHolo()
158 mActivity.getColor(R.color.calendarview_week_background_new); in testAppearanceHolo()
160 mActivity.getColor(R.color.calendarview_focusedmonthdate_new); in testAppearanceHolo()
162 mActivity.getColor(R.color.calendarview_unfocusedmonthdate_new); in testAppearanceHolo()
164 mActivity.getColor(R.color.calendarview_week_number_new); in testAppearanceHolo()
166 mActivity.getColor(R.color.calendarview_week_separatorline_new); in testAppearanceHolo()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
DMeanSquaredComparer.java96 private static float getColorSum(int color) { in getColorSum() argument
97 float red = Color.red(color) / 255.0f; in getColorSum()
98 float green = Color.green(color) / 255.0f; in getColorSum()
99 float blue = Color.blue(color) / 255.0f; in getColorSum()
/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.java38 protected boolean verifyPixel(int color, int expectedColor) { in verifyPixel() argument
39 return super.verifyPixel(color, expectedColor) in verifyPixel()
40 && CompareUtils.verifyPixelGrayScale(color, 1); in verifyPixel()
DBitmapFilterTests.java46 protected boolean verifyPixel(int x, int y, int color) {
47 int weight = Color.red(color) + Color.blue(color) + Color.green(color);
/cts/tests/tests/textureview/src/android/textureview/cts/
DTextureViewTestActivity.java112 private final float[][] color = field in TextureViewTestActivity.GLRendererImpl
121 glClearColor(color[index][0], color[index][1], color[index][2], 1.0f); in drawFrame()
/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