Searched defs:color (Results 1 - 25 of 39) sorted by relevance

12

/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
H A DCompareUtils.java9 public static boolean verifyPixelWithThreshold(int color, int expectedColor, int threshold) { argument
10 int diff = Math.abs(Color.red(color) - Color.red(expectedColor))
11 + Math.abs(Color.green(color) - Color.green(expectedColor))
12 + Math.abs(Color.blue(color) - Color.blue(expectedColor));
19 * @return True if the color is close enough to be a gray scale color.
21 public static boolean verifyPixelGrayScale(int color, int threshold) { argument
22 int average = Color.red(color) + Color.green(color) + Color.blue(color);
[all...]
/cts/tests/tests/opengl/src/android/opengl/cts/
H A DGL2JniLibOne.java26 public static native float[] draw(int category, int subcategory, float[] color); argument
H A DNativeRendererOneColorBufferTest.java61 public NativeRendererOneColorBufferTest(Context context, float[] color, CountDownLatch latch) { argument
63 this.mVertexColor = color;
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
H A DColorVerifier.java21 * Checks to see if a bitmap is entirely a single color
27 public ColorVerifier(@ColorInt int color) { argument
28 this(color, DEFAULT_THRESHOLD);
31 public ColorVerifier(@ColorInt int color, int colorTolerance) { argument
33 mColor = color;
36 public ColorVerifier(@ColorInt int color, int colorThreshold, float spatialTolerance) { argument
38 mColor = color;
H A DSamplePointVerifier.java57 " at position x = " + x + " y = " + y + " , tested color : " +
74 protected boolean verifyPixel(int color, int expectedColor) { argument
75 return CompareUtils.verifyPixelWithThreshold(color, expectedColor, mTolerance);
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
H A DShadowTests.java38 protected boolean verifyPixel(int color, int expectedColor) { argument
39 return super.verifyPixel(color, expectedColor)
40 && CompareUtils.verifyPixelGrayScale(color, 1);
/cts/tests/tests/view/src/android/view/cts/
H A DTextureViewTest.java80 int color;
81 color = waitForChange(center, Color.WHITE);
82 assertEquals(Color.GREEN, color);
86 color = waitForChange(center, color);
87 assertEquals(Color.BLUE, color);
97 private void waitForColor(Point point, int color) argument
101 if (pixel == color) {
109 private int waitForChange(Point point, int color) argument
113 if (pixel != color) {
[all...]
/cts/tests/tests/assist/src/android/assist/cts/
H A DScreenshotTest.java117 private void waitForActivityResumeAndAssist(int color) throws Exception { argument
120 extras.putInt(Utils.SCREENSHOT_COLOR_KEY, color);
H A DTestStartActivity.java108 public void start3pAppWithColor(String testCaseName, int color) { argument
111 intent.putExtra(Utils.SCREENSHOT_COLOR_KEY, color);
/cts/tests/tests/graphics/src/android/graphics/cts/
H A DBitmapShaderTest.java83 * matches the given color. Simply returns if the coordinates are outside
86 private void assertColor(int color, Bitmap bitmap, int x, int y) { argument
88 assertEquals(color, bitmap.getPixel(x, y));
H A DBlurMaskFilterTest.java49 // check that color didn't bleed (much) beyond radius
52 // check that color didn't wash out (much) in the center
55 // check blur zone, color should remain, alpha varies
62 private void checkQuadrants(int color, Bitmap bitmap, int x, int y, int alphaTolerance) { argument
66 checkColor(color, bitmap.getPixel(x, y), alphaTolerance);
67 checkColor(color, bitmap.getPixel(right - x, y), alphaTolerance);
68 checkColor(color, bitmap.getPixel(x, bottom - y), alphaTolerance);
69 checkColor(color, bitmap.getPixel(right - x, bottom - y), alphaTolerance);
/cts/tests/tests/renderscript/src/android/renderscript/cts/
H A DRsPackColorTo8888Test.java122 private byte[] rs_PackColorTo8888(Float3 color) { argument
123 color.x *= 255.f;
124 color.y *= 255.f;
125 color.z *= 255.f;
126 color.x += 0.5f;
127 color.y += 0.5f;
128 color.z += 0.5f;
130 (byte) color.x, (byte) color.y, (byte) color
135 rs_PackColorTo8888(Float4 color) argument
[all...]
/cts/tests/tests/widget/src/android/widget/cts/util/
H A DTestUtils.java103 * Checks whether all the pixels in the specified View are of the same specified color.
105 * In case there is a color mismatch, the behavior of this method depends on the
111 @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) {
122 color, allowedComponentVariance, throwExceptionIfFails);
129 * Checks whether all the pixels in the specified drawable are of the same specified color.
131 * In case there is a color mismatch, the behavior of this method depends on the
137 int drawableWidth, int drawableHeight, boolean callSetBounds, @ColorInt int color,
152 assertAllPixelsOfColor(failMessagePrefix, bitmap, drawableWidth, drawableHeight, color,
160 * Checks whether all the pixels in the specified bitmap are of the same specified color.
162 * In case there is a color mismatc
110 assertAllPixelsOfColor(String failMessagePrefix, @NonNull View view, @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) argument
136 assertAllPixelsOfColor(String failMessagePrefix, @NonNull Drawable drawable, int drawableWidth, int drawableHeight, boolean callSetBounds, @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) argument
167 assertAllPixelsOfColor(String failMessagePrefix, @NonNull Bitmap bitmap, int bitmapWidth, int bitmapHeight, @ColorInt int color, int allowedComponentVariance, boolean throwExceptionIfFails) argument
[all...]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/location/
H A DGpsTestActivity.java140 private void log(String s, int color) { argument
146 spanText.setSpan(new ForegroundColorSpan(color), start, end, 0);
/cts/hostsidetests/theme/src/android/theme/cts/
H A DComparisonTask.java77 private static int getAlphaScaledBlue(final int color) { argument
78 return (color & 0x000000FF) * getAlpha(color) / 255;
81 private static int getAlphaScaledGreen(final int color) { argument
82 return ((color & 0x0000FF00) >> 8) * getAlpha(color) / 255;
85 private static int getAlphaScaledRed(final int color) { argument
86 return ((color & 0x00FF0000) >> 16) * getAlpha(color) / 255;
89 private static int getAlpha(final int color) { argument
[all...]
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/
H A DRectShapeTest.java43 private void assertDrawSuccessfully(Bitmap bitmap, int width, int height, int color) { argument
46 assertEquals(color, bitmap.getPixel(i, j));
/cts/tests/tests/opengl/libopengltest/
H A Dgl2_jni_libone.cpp135 jclass obj, jint pCategory, jint pSubCategory, jfloatArray color)
143 jfloat *lColor = env->GetFloatArrayElements(color,0);
134 Java_android_opengl_cts_GL2JniLibOne_draw(JNIEnv * env, jclass obj, jint pCategory, jint pSubCategory, jfloatArray color) argument
/cts/tests/tests/textureview/src/android/textureview/cts/
H A DTextureViewTestActivity.java112 private final float[][] color = field in class:TextureViewTestActivity.GLRendererImpl
121 glClearColor(color[index][0], color[index][1], color[index][2], 1.0f);
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
H A DMeanSquaredComparer.java96 private static float getColorSum(int color) { argument
97 float red = Color.red(color) / 255.0f;
98 float green = Color.green(color) / 255.0f;
99 float blue = Color.blue(color) / 255.0f;
/cts/tests/tests/assist/service/src/android/voiceinteraction/service/
H A DMainInteractionSession.java159 private boolean compareScreenshot(Bitmap screenshot, int color) { argument
173 if (pixel == color) {
/cts/tests/tests/display/src/android/display/cts/
H A DVirtualDisplayTest.java64 // values for each color channel so as to detect possible RGBA vs. BGRA buffer format issues.
230 final int color, final int windowType, final int windowFlags) {
233 mImageListener.getColor() != color);
242 color, windowType, windowFlags);
249 mImageListener.waitForColor(color, TIMEOUT));
296 int color, int windowType, int windowFlags) {
298 mColor = color;
311 // Create a solid color image to use as the content of the presentation.
321 * Watches for an image with a large amount of some particular solid color to be shown.
333 public boolean waitForColor(int color, lon argument
229 assertDisplayCanShowPresentation(String message, final Display display, final int color, final int windowType, final int windowFlags) argument
295 TestPresentation(Context context, Display display, int color, int windowType, int windowFlags) argument
[all...]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
H A DGradientDrawableTest.java49 int[] color = new int[] {1, 2, 3};
52 new GradientDrawable(GradientDrawable.Orientation.BL_TR, color);
133 private void helpTestSetStroke(int width, int color) { argument
135 gradientDrawable.setStroke(width, color);
146 private void helpTestSetStroke_WidthGap(int width, int color, argument
149 gradientDrawable.setStroke(width, color, dashWidth, dashGap);
291 int color;
293 color = Color.RED;
294 gradientDrawable.setColor(color);
295 assertEquals("Color was set to " + color, colo
[all...]
H A DTransitionDrawableTest.java196 private void assertColorFillRect(Bitmap bmp, int x, int y, int w, int h, int color) { argument
199 assertEquals(color, bmp.getPixel(i, j));
204 private void assertColorNotFillRect(Bitmap bmp, int x, int y, int w, int h, int color) { argument
207 assertTrue(color != bmp.getPixel(i, j));
/cts/tests/tests/media/src/android/media/cts/
H A DEncodeVirtualDisplayTest.java242 // Run the color slide show on a separate thread.
356 // Sometimes we see the same color two frames in a row.
359 // Looks like we missed a color frame. It's possible something
469 * will appear between each color frame.
471 * @return the color index, or -2 for black
472 * @throw RuntimeException if the color isn't recognized (probably because the RGB<->YUV
492 // Walk through the color list and try to find a match. These may have gone through
500 if (VERBOSE) Log.d(TAG, "Matched color " + i + ": r=" + r + " g=" + g + " b=" + b);
505 throw new RuntimeException("No match for color r=" + r + " g=" + g + " b=" + b);
509 * Determines if two color value
536 showPresentation(final int color) argument
595 TestPresentation(Context context, Display display, int color) argument
[all...]
H A DRemoteVirtualDisplayService.java45 /** argument: int color, return none */
67 int color = data.readInt();
68 render(color);
103 private void render(int color) { argument
105 Log.i(TAG, "render " + Integer.toHexString(color));
107 mPresentation.doRendering(color);
160 public void doRendering(final int color) { argument
164 mPresentation.doRendering(color);
190 public void doRendering(int color) { argument
191 mImageView.setImageDrawable(new ColorDrawable(color));
[all...]

Completed in 539 milliseconds

12