/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | SweepGradientTest.java | 68 final int[] colors = new int[] { Color.GREEN, Color.RED }; in test2Colors() local 70 Shader shader = new SweepGradient(CENTER, CENTER, colors[0], colors[1]); in test2Colors() 73 verifyColors(colors, positions, TOLERANCE); in test2Colors() 78 final int[] colors = new int[] { Color.GREEN, Color.RED, Color.BLUE }; in testColorArray() local 80 Shader shader = new SweepGradient(CENTER, CENTER, colors, positions); in testColorArray() 84 verifyColors(colors, positions, TOLERANCE); in testColorArray() 89 final int[] colors = new int[] { Color.GREEN, Color.RED, Color.BLUE, Color.GREEN }; in testMultiColor() local 92 Shader shader = new SweepGradient(CENTER, CENTER, colors, positions); in testMultiColor() 96 verifyColors(colors, positions, TOLERANCE); in testMultiColor() 99 private void verifyColors(int[] colors, float[] positions, int tolerance) { in verifyColors() argument [all …]
|
D | LinearGradientTest.java | 86 long[] colors = new long[] { blue, green, red }; 89 LinearGradient lg = new LinearGradient(0, 0, 0, 40, colors, positions, TileMode.CLAMP); 162 int[] colors = null; 163 new LinearGradient(0.5f, 0, 1.5f, 0, colors, null, TileMode.CLAMP); 168 long[] colors = null; 169 new LinearGradient(0.5f, 0, 1.5f, 0, colors, null, TileMode.CLAMP); 194 long[] colors = new long[2]; 195 colors[0] = Color.pack(Color.BLUE); 196 colors[1] = Color.pack(.5f, .5f, .5f, 1.0f, ColorSpace.get(ColorSpace.Named.DISPLAY_P3)); 197 new LinearGradient(0.5f, 0, 1.5f, 0, colors, null, TileMode.CLAMP); [all …]
|
D | RadialGradientTest.java | 140 int[] colors = null; in testNullColorInts() local 141 new RadialGradient(0.5f, 0.5f, 1, colors, null, TileMode.CLAMP); in testNullColorInts() 146 long[] colors = null; in testNullColorLongs() local 147 new RadialGradient(0.5f, 0.5f, 1, colors, null, TileMode.CLAMP); in testNullColorLongs() 172 long[] colors = new long[2]; in testMismatchColorLongs() local 173 colors[0] = Color.pack(Color.BLUE); in testMismatchColorLongs() 174 colors[1] = Color.pack(.5f, .5f, .5f, 1.0f, ColorSpace.get(ColorSpace.Named.DISPLAY_P3)); in testMismatchColorLongs() 175 new RadialGradient(0.5f, 0.5f, 1, colors, null, TileMode.CLAMP); in testMismatchColorLongs() 197 long[] colors = new long[2]; in testInvalidColorLongs() local 198 colors[0] = -1L; in testInvalidColorLongs() [all …]
|
D | BitmapTest.java | 233 int[] colors = createColors(100); in testCreateBitmap1() local 234 Bitmap bitmap = Bitmap.createBitmap(colors, 10, 10, Config.RGB_565); in testCreateBitmap1() 387 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeWidthHeight() local 390 Bitmap.createBitmap(colors, 0, 100, -1, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeWidthHeight() 395 int[] colors = createColors(100); in testCreateBitmapFromColorsIllegalStride() local 398 Bitmap.createBitmap(colors, 10, 10, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsIllegalStride() 403 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeOffset() local 406 Bitmap.createBitmap(colors, -10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeOffset() 411 int[] colors = createColors(100); in testCreateBitmapFromColorsOffsetTooLarge() local 414 Bitmap.createBitmap(colors, 10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsOffsetTooLarge() [all …]
|
/cts/tests/app/src/android/app/cts/ |
D | WallpaperColorsTest.java | 47 WallpaperColors colors = new WallpaperColors(colorList.get(0), colorList.get(1), in getWallpaperColorsTest() local 49 Assert.assertSame(colors.getPrimaryColor(), colorList.get(0)); in getWallpaperColorsTest() 50 Assert.assertSame(colors.getSecondaryColor(), colorList.get(1)); in getWallpaperColorsTest() 51 Assert.assertSame(colors.getTertiaryColor(), colorList.get(2)); in getWallpaperColorsTest() 87 WallpaperColors colors = WallpaperColors.fromBitmap(bmp); in fromBitmapTest() local 88 Assert.assertNotNull(colors.getPrimaryColor()); in fromBitmapTest() 89 Assert.assertNull(colors.getSecondaryColor()); in fromBitmapTest() 97 WallpaperColors colors = WallpaperColors.fromDrawable(drawable); in fromDrawableTest() local 98 Assert.assertNotNull(colors.getPrimaryColor()); in fromDrawableTest() 99 Assert.assertNull(colors.getSecondaryColor()); in fromDrawableTest()
|
D | WallpaperManagerTest.java | 203 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> latch.countDown(); in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded() 253 WallpaperColors colors = mWallpaperManager.getWallpaperColors( in wallpaperColors_primary() local 257 Color primary = colors.getPrimaryColor(); in wallpaperColors_primary() 263 Assert.assertNull(colors.getSecondaryColor()); in wallpaperColors_primary() 264 Assert.assertNull(colors.getTertiaryColor()); in wallpaperColors_primary() 284 WallpaperColors colors = mWallpaperManager.getWallpaperColors( in wallpaperColors_secondary() local 288 Color secondary = colors.getSecondaryColor(); in wallpaperColors_secondary() 294 Assert.assertNull(colors.getTertiaryColor()); in wallpaperColors_secondary() 340 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvoked() 389 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvokedClearing() [all …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | HtmlTest.java | 112 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColor() local 113 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor() 116 colors = s.getSpans(0, s.length(), type); in testColor() 117 assertEquals(0xFF000080, colors[0].getForegroundColor()); in testColor() 120 colors = s.getSpans(0, s.length(), type); in testColor() 121 assertEquals(0, colors.length); in testColor() 125 colors = s.getSpans(0, s.length(), type); in testColor() 126 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor() 129 colors = s.getSpans(0, s.length(), type); in testColor() 130 assertEquals(0xFF888888, colors[0].getForegroundColor()); in testColor() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | BitmapBlendModeTest.java | 50 int[] colors = {Color.RED, Color.RED, Color.RED, Color.RED, Color.RED}; in testClearBlendMode() local 55 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testClearBlendMode() 64 int[] colors = {Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE, Color.RED}; in testDstOutBlendMode() local 69 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testDstOutBlendMode()
|
D | CanvasTests.java | 86 int[] colors = { in testDrawDoubleRoundRect() local 112 .runWithVerifier(new SamplePointVerifier(testPoints, colors)); in testDrawDoubleRoundRect() 127 int[] colors = { in testDrawDoubleRoundRectWithRadii() local 166 .runWithVerifier(new SamplePointVerifier(testPoints, colors)); in testDrawDoubleRoundRectWithRadii() 479 final int[] colors = new int[10]; in testDrawVerticesTooFewVerts() local 487 verts, 8, texs, 0, colors, 0, indices, in testDrawVerticesTooFewVerts() 495 final int[] colors = new int[10]; in testDrawVerticesTooFewTexs() local 503 verts, 0, texs, 30, colors, 0, indices, in testDrawVerticesTooFewTexs() 511 final int[] colors = new int[10]; in testDrawVerticesTooFewColors() local 519 verts, 0, texs, 0, colors, 30, indices, in testDrawVerticesTooFewColors() [all …]
|
D | BlendModeColorFilterTest.java | 87 private void testBlendModeColorFilter(int filterColor, BlendMode mode, int[] colors) { in testBlendModeColorFilter() argument 89 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testBlendModeColorFilter()
|
/cts/tests/tests/uirendering27/src/android/uirendering/cts/testclasses/ |
D | BitmapBlendModeTest.java | 51 int[] colors = {Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE, Color.RED}; in testClearBlendMode() local 56 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testClearBlendMode() 65 int[] colors = {Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE, Color.RED}; in testDstOutBlendMode() local 70 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testDstOutBlendMode()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | SwitchTest.java | 98 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTint() local 99 mSwitch.setThumbTintList(colors); in testAccessThumbTint() 102 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTint() 115 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTintBlendMode() local 116 mSwitch.setThumbTintList(colors); in testAccessThumbTintBlendMode() 119 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTintBlendMode() 132 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTint() local 133 mSwitch.setTrackTintList(colors); in testAccessTrackTint() 136 assertSame(colors, mSwitch.getTrackTintList()); in testAccessTrackTint() 149 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTintBlendMode() local [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | MenuItemTest.java | 83 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessIconTint() local 85 firstItem.setIconTintList(colors); in testAccessIconTint() 89 assertSame(colors, firstItem.getIconTintList()); in testAccessIconTint() 95 assertSame(colors, firstItem.getIconTintList()); in testAccessIconTint()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/cube/ |
D | Cube.java | 44 int colors[] = { in Cube() local 78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); in Cube() 81 mColorBuffer.put(colors); in Cube()
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | ColorStateListTest.java | 40 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testConstructor() local 41 final ColorStateList c = new ColorStateList(state, colors); in testConstructor() 89 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testWithAlpha() local 90 final ColorStateList c = new ColorStateList(state, colors); in testWithAlpha()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | CtsMediaTextureRender.java | 282 int[] colors = new int[pixelCount]; in saveFrame() local 283 buf.asIntBuffer().get(colors); in saveFrame() 285 int c = colors[i]; in saveFrame() 286 colors[i] = (c & 0xff00ff00) | ((c & 0x00ff0000) >> 16) | ((c & 0x000000ff) << 16); in saveFrame() 292 Bitmap bmp = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); in saveFrame()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | TextureRender.java | 278 int[] colors = new int[pixelCount]; in saveFrame() local 279 buf.asIntBuffer().get(colors); in saveFrame() 281 int c = colors[i]; in saveFrame() 282 colors[i] = (c & 0xff00ff00) | ((c & 0x00ff0000) >> 16) | ((c & 0x000000ff) << 16); in saveFrame() 288 Bitmap bmp = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); in saveFrame()
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | GradientDrawableTest.java | 353 int[] colors; in testSetColors() local 355 colors = new int[] { Color.RED }; in testSetColors() 356 gradientDrawable.setColors(colors); in testSetColors() 357 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors() 358 colors, gradientDrawable.getColors()); in testSetColors() 360 colors = null; in testSetColors() 361 gradientDrawable.setColors(colors); in testSetColors() 362 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors() 363 colors, gradientDrawable.getColors()); in testSetColors() 707 int[] colors = drawable.getColors(); in testInflationWithThemeAndNonThemeResources() local [all …]
|
D | ColorStateListDrawableTest.java | 56 final int[] colors = new int[]{Color.RED, Color.BLUE}; in setup() local 57 mColorStateList = new ColorStateList(state, colors); in setup() 106 final int[] colors = new int[]{Color.MAGENTA, Color.CYAN}; in testHasFocusStateSpecified() local 107 mDrawable.setColorStateList(new ColorStateList(state, colors)); in testHasFocusStateSpecified()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | OrganizationInfoTest.java | 36 final int[] colors = { in testSetOrganizationColor() local 45 for (int color : colors) { in testSetOrganizationColor()
|
/cts/tests/tests/graphics/assets/shaders/ |
D | tri.frag | 23 vec3 colors; 26 uFragColor = vec4(colorData.colors, 1.0);
|
/cts/suite/cts/utils/ |
D | grapher.py | 29 colors = { variable 68 clr = colors.get(name, "#%06X" % (hash(name) % 0xFFFFFF))
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/ |
D | SamplePointWideGamutVerifier.java | 33 public SamplePointWideGamutVerifier(Point[] points, Color[] colors, float eps) { in SamplePointWideGamutVerifier() argument 35 mColors = colors; in SamplePointWideGamutVerifier()
|
/cts/tests/tests/opengl/src/android/opengl/cts/ |
D | FramebufferTest.java | 609 int[] colors = new int[pixelCount]; in saveFrame() local 610 buf.asIntBuffer().get(colors); in saveFrame() 612 int c = colors[i]; in saveFrame() 613 colors[i] = (c & 0xff00ff00) | ((c & 0x00ff0000) >> 16) | ((c & 0x000000ff) << 16); in saveFrame() 619 Bitmap bmp = Bitmap.createBitmap(colors, mWidth, mHeight, Bitmap.Config.ARGB_8888); in saveFrame()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/ |
D | NavigationBarColorVerifier.java | 94 final int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE}; in verify() local 95 for (int color : colors) { in verify()
|