/frameworks/base/libs/hwui/ |
D | GradientCache.h | 36 colors = NULL; in GradientCacheEntry() 40 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { in GradientCacheEntry() 41 copy(colors, positions, count); in GradientCacheEntry() 45 copy(entry.colors, entry.positions, entry.count); in GradientCacheEntry() 49 delete[] colors; in ~GradientCacheEntry() 55 delete[] colors; 58 copy(entry.colors, entry.positions, entry.count); 76 uint32_t* colors; member 81 void copy(uint32_t* colors, float* positions, uint32_t count) { in copy() 83 this->colors = new uint32_t[count]; in copy() [all …]
|
D | GradientCache.cpp | 45 hash = JenkinsHashMix(hash, android::hash_type(colors[i])); in hash() 55 deltaInt = memcmp(lhs.colors, rhs.colors, lhs.count * sizeof(uint32_t)); in compare() 132 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { in get() argument 133 GradientCacheEntry gradient(colors, positions, count); in get() 137 texture = addLinearGradient(gradient, colors, positions, count); in get() 147 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, in getGradientInfo() argument 160 if (((colors[i] >> 24) & 0xff) < 255) { in getGradientInfo() 171 uint32_t* colors, float* positions, int count) { in addLinearGradient() argument 174 getGradientInfo(colors, count, info); in addLinearGradient() 188 generateTexture(colors, positions, texture); in addLinearGradient() [all …]
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | GradientStopsActivity.java | 45 int[] colors = new int[] { 0xffff0000, 0xff0000ff }; in onDraw() local 48 colors, positions, Shader.TileMode.CLAMP); in onDraw() 55 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 }; in onDraw() 58 colors, positions, Shader.TileMode.CLAMP); in onDraw() 65 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 }; in onDraw() 68 colors, positions, Shader.TileMode.CLAMP); in onDraw() 75 colors = new int[] { 0xff000000, 0xffffffff }; in onDraw() 77 colors, null, Shader.TileMode.CLAMP); in onDraw() 85 colors, null, Shader.TileMode.REPEAT); in onDraw() 93 colors, null, Shader.TileMode.MIRROR); in onDraw() [all …]
|
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/ |
D | BitmapTest.java | 81 int[] colors = new int[100]; in testGetPixelsWithAlpha() local 83 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i; in testGetPixelsWithAlpha() 86 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, in testGetPixelsWithAlpha() 98 assertEquals("getPixel", p, colors[i]); in testGetPixelsWithAlpha() 107 int[] colors = new int[100]; in testGetPixelsWithoutAlpha() local 109 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i; in testGetPixelsWithoutAlpha() 112 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, Bitmap.Config.RGB_565); in testGetPixelsWithoutAlpha() 124 int[] colors = new int[100]; in testSetPixelsWithAlpha() local 126 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i; in testSetPixelsWithAlpha() 130 Bitmap bm1 = Bitmap.createBitmap(colors, 10, 10, config); in testSetPixelsWithAlpha() [all …]
|
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
D | Gradient_Delegate.java | 49 protected Gradient_Delegate(int colors[], float positions[]) { in Gradient_Delegate() argument 50 if (colors.length < 2) { in Gradient_Delegate() 53 if (positions != null && colors.length != positions.length) { in Gradient_Delegate() 58 float spacing = 1.f / (colors.length - 1); in Gradient_Delegate() 59 positions = new float[colors.length]; in Gradient_Delegate() 61 positions[colors.length-1] = 1.f; in Gradient_Delegate() 62 for (int i = 1; i < colors.length - 1 ; i++) { in Gradient_Delegate() 67 mColors = colors; in Gradient_Delegate() 84 protected GradientPaint(int[] colors, float[] positions, TileMode tileMode) { in GradientPaint() argument 85 mColors = colors; in GradientPaint()
|
D | RadialGradient_Delegate.java | 58 int colors[], float positions[], int tileMode) { in nativeCreate1() argument 60 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1() 87 private RadialGradient_Delegate(float x, float y, float radius, int colors[], float positions[], in RadialGradient_Delegate() argument 89 super(colors, positions); in RadialGradient_Delegate() 100 int[] colors, float[] positions, TileMode mode) { in RadialGradientPaint() argument 101 super(colors, positions, mode); in RadialGradientPaint()
|
D | SweepGradient_Delegate.java | 55 /*package*/ static long nativeCreate1(float x, float y, int colors[], float positions[]) { in nativeCreate1() argument 56 SweepGradient_Delegate newDelegate = new SweepGradient_Delegate(x, y, colors, positions); in nativeCreate1() 82 int colors[], float positions[]) { in SweepGradient_Delegate() argument 83 super(colors, positions); in SweepGradient_Delegate() 92 public SweepGradientPaint(float cx, float cy, int[] colors, in SweepGradientPaint() argument 94 super(colors, positions, null /*tileMode*/); in SweepGradientPaint()
|
D | LinearGradient_Delegate.java | 59 int colors[], float positions[], int tileMode) { in nativeCreate1() argument 61 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1() 90 int colors[], float positions[], TileMode tile) { in LinearGradient_Delegate() argument 91 super(colors, positions); in LinearGradient_Delegate() 109 public LinearGradientPaint(float x0, float y0, float x1, float y1, int colors[], in LinearGradientPaint() argument 111 super(colors, positions, tile); in LinearGradientPaint()
|
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/ |
D | TintManager.java | 231 final int[] colors = new int[7]; in getDefaultColorStateList() local 236 colors[i] = getDisabledThemeAttrColor(R.attr.colorControlNormal); in getDefaultColorStateList() 240 colors[i] = colorControlActivated; in getDefaultColorStateList() 244 colors[i] = colorControlActivated; in getDefaultColorStateList() 248 colors[i] = colorControlActivated; in getDefaultColorStateList() 252 colors[i] = colorControlActivated; in getDefaultColorStateList() 256 colors[i] = colorControlActivated; in getDefaultColorStateList() 261 colors[i] = colorControlNormal; in getDefaultColorStateList() 264 mDefaultColorStateList = new ColorStateList(states, colors); in getDefaultColorStateList() 272 final int[] colors = new int[3]; in getSwitchTrackColorStateList() local [all …]
|
/frameworks/opt/colorpicker/src/com/android/colorpicker/ |
D | ColorPickerDialog.java | 62 public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor, in newInstance() argument 65 ret.initialize(titleResId, colors, selectedColor, columns, size); in newInstance() 69 public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size) { in initialize() argument 71 setColors(colors, selectedColor); in initialize() 159 public void setColors(int[] colors, int selectedColor) { in setColors() argument 160 if (mColors != colors || mSelectedColor != selectedColor) { in setColors() 161 mColors = colors; in setColors() 167 public void setColors(int[] colors) { in setColors() argument 168 if (mColors != colors) { in setColors() 169 mColors = colors; in setColors()
|
D | ColorPickerPalette.java | 84 public void drawPalette(int[] colors, int selectedColor) { in drawPalette() argument 85 if (colors == null) { in drawPalette() 96 for (int color : colors) { in drawPalette()
|
/frameworks/base/graphics/java/android/graphics/ |
D | SweepGradient.java | 52 int colors[], float positions[]) { in SweepGradient() argument 53 if (colors.length < 2) { in SweepGradient() 56 if (positions != null && colors.length != positions.length) { in SweepGradient() 63 mColors = colors; in SweepGradient() 65 init(nativeCreate1(cx, cy, colors, positions)); in SweepGradient() 107 private static native long nativeCreate1(float x, float y, int colors[], float positions[]); in nativeCreate1() argument
|
D | LinearGradient.java | 52 public LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[], in LinearGradient() argument 54 if (colors.length < 2) { in LinearGradient() 57 if (positions != null && colors.length != positions.length) { in LinearGradient() 65 mColors = colors; in LinearGradient() 68 init(nativeCreate1(x0, y0, x1, y1, colors, positions, tile.nativeInt)); in LinearGradient() 116 int colors[], float positions[], int tileMode); in nativeCreate1() argument
|
D | RadialGradient.java | 55 @NonNull int colors[], @Nullable float stops[], @NonNull TileMode tileMode) { in RadialGradient() argument 59 if (colors.length < 2) { in RadialGradient() 62 if (stops != null && colors.length != stops.length) { in RadialGradient() 69 mColors = colors; in RadialGradient() 72 init(nativeCreate1(centerX, centerY, radius, colors, stops, tileMode.nativeInt)); in RadialGradient() 121 int colors[], float positions[], int tileMode); in nativeCreate1() argument
|
D | Bitmap.java | 849 public static Bitmap createBitmap(int colors[], int offset, int stride, in createBitmap() argument 851 return createBitmap(null, colors, offset, stride, width, height, config); in createBitmap() 874 public static Bitmap createBitmap(DisplayMetrics display, int colors[], in createBitmap() argument 882 int length = colors.length; in createBitmap() 890 Bitmap bm = nativeCreate(colors, offset, stride, width, height, in createBitmap() 913 public static Bitmap createBitmap(int colors[], int width, int height, Config config) { in createBitmap() argument 914 return createBitmap(null, colors, 0, width, width, height, config); in createBitmap() 934 public static Bitmap createBitmap(DisplayMetrics display, int colors[], in createBitmap() argument 936 return createBitmap(display, colors, 0, width, width, height, config); in createBitmap() 1611 private static native Bitmap nativeCreate(int[] colors, int offset, in nativeCreate() argument [all …]
|
D | Canvas.java | 1404 public void drawBitmap(@NonNull int[] colors, int offset, int stride, float x, float y, in drawBitmap() argument 1417 int length = colors.length; in drawBitmap() 1427 … native_drawBitmap(mNativeCanvasWrapper, colors, offset, stride, x, y, width, height, hasAlpha, in drawBitmap() 1440 public void drawBitmap(@NonNull int[] colors, int offset, int stride, int x, int y, in drawBitmap() argument 1443 drawBitmap(colors, offset, stride, (float)x, (float)y, width, height, in drawBitmap() 1495 @NonNull float[] verts, int vertOffset, @Nullable int[] colors, int colorOffset, in drawBitmapMesh() argument 1506 if (colors != null) { in drawBitmapMesh() 1508 checkRange(colors.length, colorOffset, count); in drawBitmapMesh() 1511 verts, vertOffset, colors, colorOffset, in drawBitmapMesh() 1561 int vertOffset, @Nullable float[] texs, int texOffset, @Nullable int[] colors, in drawVertices() argument [all …]
|
/frameworks/native/opengl/libagl/ |
D | dxt.cpp | 152 uint32_t colors = *d32++; in DXT1HasAlpha() local 155 colors = swap(colors); in DXT1HasAlpha() 158 uint16_t color0 = colors & 0xffff; in DXT1HasAlpha() 159 uint16_t color1 = colors >> 16; in DXT1HasAlpha() 215 uint32_t colors = *d32++; in decodeDXT1() local 219 colors = swap(colors); in decodeDXT1() 224 uint16_t color0 = colors & 0xffff; in decodeDXT1() 225 uint16_t color1 = colors >> 16; in decodeDXT1() 338 uint32_t colors = *d32++; in decodeDXT3() local 342 colors = swap(colors); in decodeDXT3() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | NotificationColorUtil.java | 180 int[] colors = colorStateList.getColors(); in processTextAppearanceSpan() local 182 for (int i = 0; i < colors.length; i++) { in processTextAppearanceSpan() 183 if (ImageUtils.isGrayscale(colors[i])) { in processTextAppearanceSpan() 188 colors = Arrays.copyOf(colors, colors.length); in processTextAppearanceSpan() 190 colors[i] = processColor(colors[i]); in processTextAppearanceSpan() 197 new ColorStateList(colorStateList.getStates(), colors), in processTextAppearanceSpan()
|
/frameworks/base/core/jni/android/graphics/ |
D | Shader.cpp | 124 SkColor colors[2]; in LinearGradient_create2() local 125 colors[0] = color0; in LinearGradient_create2() 126 colors[1] = color1; in LinearGradient_create2() 128 … SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode); in LinearGradient_create2() 166 SkColor colors[2]; in RadialGradient_create2() local 167 colors[0] = color0; in RadialGradient_create2() 168 colors[1] = color1; in RadialGradient_create2() 170 SkShader* s = SkGradientShader::CreateRadial(center, radius, colors, NULL, 2, in RadialGradient_create2() 181 const jint* colors = env->GetIntArrayElements(jcolors, NULL); in SweepGradient_create1() local 191 reinterpret_cast<const SkColor*>(colors), pos, count); in SweepGradient_create1() [all …]
|
/frameworks/base/core/java/android/content/res/ |
D | ColorStateList.java | 81 public ColorStateList(int[][] states, int[] colors) { in ColorStateList() argument 83 mColors = colors; in ColorStateList() 86 mDefaultColor = colors[0]; in ColorStateList() 90 mDefaultColor = colors[i]; in ColorStateList() 162 final int[] colors = new int[mColors.length]; in withAlpha() local 163 final int len = colors.length; in withAlpha() 165 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24); in withAlpha() 168 return new ColorStateList(mStateSpecs, colors); in withAlpha() 411 final int[] colors = source.createIntArray(); 412 return new ColorStateList(stateSpecs, colors);
|
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/ |
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()
|
/frameworks/native/cmds/flatland/ |
D | Renderers.cpp | 22 static float colors[][4] = { variable 33 float* color = colors[g_colorIndex]; in genColor() 34 g_colorIndex = (g_colorIndex + 1) % NELEMS(colors); in genColor()
|
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
D | TitleView.java | 111 public void setSearchAffordanceColors(SearchOrbView.Colors colors) { in setSearchAffordanceColors() argument 112 mSearchOrbView.setOrbColors(colors); in setSearchAffordanceColors()
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | GradientDrawable.java | 181 public GradientDrawable(Orientation orientation, int[] colors) { in GradientDrawable() argument 182 this(new GradientState(orientation, colors), null); in GradientDrawable() 501 public void setColors(int[] colors) { in setColors() argument 502 mGradientState.setColors(colors); in setColors() 871 final int[] colors = st.mColors; 872 if (colors != null) { 914 colors, st.mPositions, Shader.TileMode.CLAMP)); 939 x0, y0, radius, colors, null, Shader.TileMode.CLAMP)); 944 int[] tempColors = colors; 949 final int length = colors.length; [all …]
|
/frameworks/base/core/java/android/view/ |
D | GLES20Canvas.java | 645 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, in drawBitmap() argument 660 int length = colors.length; in drawBitmap() 668 nDrawBitmap(mRenderer, colors, offset, stride, x, y, in drawBitmap() 672 private static native void nDrawBitmap(long renderer, int[] colors, int offset, int stride, in nDrawBitmap() argument 676 public void drawBitmap(int[] colors, int offset, int stride, int x, int y, in drawBitmap() argument 678 drawBitmap(colors, offset, stride, (float) x, (float) y, width, height, hasAlpha, paint); in drawBitmap() 683 int vertOffset, int[] colors, int colorOffset, Paint paint) { in drawBitmapMesh() argument 696 if (colors != null) { in drawBitmapMesh() 697 checkRange(colors.length, colorOffset, count); in drawBitmapMesh() 702 verts, vertOffset, colors, colorOffset, nativePaint); in drawBitmapMesh() [all …]
|