Home
last modified time | relevance | path

Searched refs:colors (Results 1 – 25 of 92) sorted by relevance

1234

/frameworks/base/libs/hwui/
DGradientCache.h36 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 …]
DGradientCache.cpp45 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, count, texture); in addLinearGradient()
[all …]
DSkiaShader.h162 ANDROID_API SkiaLinearGradientShader(float* bounds, uint32_t* colors, float* positions,
186 ANDROID_API SkiaSweepGradientShader(float x, float y, uint32_t* colors, float* positions,
196 SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, float* positions,
211 ANDROID_API SkiaCircularGradientShader(float x, float y, float radius, uint32_t* colors,
DSkiaShader.cpp181 SkiaLinearGradientShader::SkiaLinearGradientShader(float* bounds, uint32_t* colors, in SkiaLinearGradientShader() argument
185 mBounds(bounds), mColors(colors), mPositions(positions), mCount(count) { in SkiaLinearGradientShader()
261 uint32_t* colors, float* positions, int count, SkShader* key, SkShader::TileMode tileMode, in SkiaCircularGradientShader() argument
263 SkiaSweepGradientShader(kCircularGradient, x, y, colors, positions, count, key, in SkiaCircularGradientShader()
299 SkiaSweepGradientShader::SkiaSweepGradientShader(float x, float y, uint32_t* colors, in SkiaSweepGradientShader() argument
303 mColors(colors), mPositions(positions), mCount(count) { in SkiaSweepGradientShader()
313 SkiaSweepGradientShader::SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, in SkiaSweepGradientShader() argument
317 mColors(colors), mPositions(positions), mCount(count) { in SkiaSweepGradientShader()
DDisplayListRenderer.cpp304 float* vertices, int* colors, SkPaint* paint) { in drawBitmapMesh() argument
309 colors = refBuffer<int>(colors, count); in drawBitmapMesh()
312 vertices, colors, paint)); in drawBitmapMesh()
317 const int32_t* yDivs, const uint32_t* colors, uint32_t width, uint32_t height, in drawPatch() argument
326 colors = refBuffer<uint32_t>(colors, numColors); in drawPatch()
328 addDrawOp(new (alloc()) DrawPatchOp(bitmap, xDivs, yDivs, colors, width, height, numColors, in drawPatch()
/frameworks/base/core/tests/coretests/src/android/text/
DHtmlTest.java80 ForegroundColorSpan[] colors; in testColor() local
83 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); in testColor()
84 assertEquals(1, colors.length); in testColor()
85 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor()
88 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); in testColor()
89 assertEquals(1, colors.length); in testColor()
90 assertEquals(0xFF000080, colors[0].getForegroundColor()); in testColor()
93 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); in testColor()
94 assertEquals(0, colors.length); in testColor()
102 TextAppearanceSpan[] colors; in testResourceColor() local
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DGradientStopsActivity.java45 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/
DBitmapTest.java81 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/graphics/java/android/graphics/
DSweepGradient.java36 int colors[], float positions[]) { in SweepGradient() argument
37 if (colors.length < 2) { in SweepGradient()
40 if (positions != null && colors.length != positions.length) { in SweepGradient()
44 native_instance = nativeCreate1(cx, cy, colors, positions); in SweepGradient()
45 native_shader = nativePostCreate1(native_instance, cx, cy, colors, positions); in SweepGradient()
61 private static native int nativeCreate1(float x, float y, int colors[], float positions[]); in nativeCreate1() argument
65 int[] colors, float[] positions); in nativePostCreate1() argument
DRadialGradient.java32 int colors[], float positions[], TileMode tile) { in RadialGradient() argument
36 if (colors.length < 2) { in RadialGradient()
39 if (positions != null && colors.length != positions.length) { in RadialGradient()
42 native_instance = nativeCreate1(x, y, radius, colors, positions, tile.nativeInt); in RadialGradient()
43 native_shader = nativePostCreate1(native_instance, x, y, radius, colors, positions, in RadialGradient()
66 int colors[], float positions[], int tileMode); in nativeCreate1() argument
71 int colors[], float positions[], int tileMode); in nativePostCreate1() argument
DLinearGradient.java31 public LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[], in LinearGradient() argument
33 if (colors.length < 2) { in LinearGradient()
36 if (positions != null && colors.length != positions.length) { in LinearGradient()
39 native_instance = nativeCreate1(x0, y0, x1, y1, colors, positions, tile.nativeInt); in LinearGradient()
40 native_shader = nativePostCreate1(native_instance, x0, y0, x1, y1, colors, positions, in LinearGradient()
61 int colors[], float positions[], int tileMode); in nativeCreate1() argument
65 int colors[], float positions[], int tileMode); in nativePostCreate1() argument
DBitmap.java731 public static Bitmap createBitmap(int colors[], int offset, int stride, in createBitmap() argument
733 return createBitmap(null, colors, offset, stride, width, height, config); in createBitmap()
756 public static Bitmap createBitmap(DisplayMetrics display, int colors[], in createBitmap() argument
764 int length = colors.length; in createBitmap()
772 Bitmap bm = nativeCreate(colors, offset, stride, width, height, in createBitmap()
795 public static Bitmap createBitmap(int colors[], int width, int height, Config config) { in createBitmap() argument
796 return createBitmap(null, colors, 0, width, width, height, config); in createBitmap()
816 public static Bitmap createBitmap(DisplayMetrics display, int colors[], in createBitmap() argument
818 return createBitmap(display, colors, 0, width, width, height, config); in createBitmap()
1401 private static native Bitmap nativeCreate(int[] colors, int offset, in nativeCreate() argument
[all …]
DCanvas.java1183 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, in drawBitmap() argument
1196 int length = colors.length; in drawBitmap()
1206 native_drawBitmap(mNativeCanvas, colors, offset, stride, x, y, width, height, hasAlpha, in drawBitmap()
1212 public void drawBitmap(int[] colors, int offset, int stride, int x, int y, in drawBitmap() argument
1215 drawBitmap(colors, offset, stride, (float)x, (float)y, width, height, in drawBitmap()
1267 float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) { in drawBitmapMesh() argument
1277 if (colors != null) { in drawBitmapMesh()
1279 checkRange(colors.length, colorOffset, count); in drawBitmapMesh()
1282 verts, vertOffset, colors, colorOffset, in drawBitmapMesh()
1332 float[] texs, int texOffset, int[] colors, int colorOffset, in drawVertices() argument
[all …]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DGradient_Delegate.java49 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()
DSweepGradient_Delegate.java55 /*package*/ static int 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()
67 int[] colors, float[] positions) { in nativePostCreate1() argument
96 int colors[], float positions[]) { in SweepGradient_Delegate() argument
97 super(colors, positions); in SweepGradient_Delegate()
106 public SweepGradientPaint(float cx, float cy, int[] colors, in SweepGradientPaint() argument
108 super(colors, positions, null /*tileMode*/); in SweepGradientPaint()
DRadialGradient_Delegate.java58 int colors[], float positions[], int tileMode) { in nativeCreate1() argument
60 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1()
73 int colors[], float positions[], int tileMode) { in nativePostCreate1() argument
101 private RadialGradient_Delegate(float x, float y, float radius, int colors[], float positions[], in RadialGradient_Delegate() argument
103 super(colors, positions); in RadialGradient_Delegate()
114 int[] colors, float[] positions, TileMode mode) { in RadialGradientPaint() argument
115 super(colors, positions, mode); in RadialGradientPaint()
DLinearGradient_Delegate.java59 int colors[], float positions[], int tileMode) { in nativeCreate1() argument
61 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1()
77 int colors[], float positions[], int tileMode) { in nativePostCreate1() argument
106 int colors[], float positions[], TileMode tile) { in LinearGradient_Delegate() argument
107 super(colors, positions); in LinearGradient_Delegate()
125 public LinearGradientPaint(float x0, float y0, float x1, float y1, int colors[], in LinearGradientPaint() argument
127 super(colors, positions, tile); in LinearGradientPaint()
/frameworks/opt/colorpicker/src/com/android/colorpicker/
DColorPickerDialog.java62 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()
DColorPickerPalette.java84 public void drawPalette(int[] colors, int selectedColor) { in drawPalette() argument
85 if (colors == null) { in drawPalette()
96 for (int color : colors) { in drawPalette()
/frameworks/native/opengl/libagl/
Ddxt.cpp152 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/android/content/res/
DColorStateList.java78 public ColorStateList(int[][] states, int[] colors) { in ColorStateList() argument
80 mColors = colors; in ColorStateList()
83 mDefaultColor = colors[0]; in ColorStateList()
87 mDefaultColor = colors[i]; in ColorStateList()
160 int[] colors = new int[mColors.length]; in withAlpha() local
162 int len = colors.length; in withAlpha()
164 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24); in withAlpha()
167 return new ColorStateList(mStateSpecs, colors); in withAlpha()
324 int[] colors = source.createIntArray();
325 return new ColorStateList(stateSpecs, colors);
/frameworks/base/core/jni/android/graphics/
DShader.cpp248 SkColor colors[2]; in LinearGradient_create2() local
249 colors[0] = color0; in LinearGradient_create2()
250 colors[1] = color1; in LinearGradient_create2()
252 … SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode); in LinearGradient_create2()
296 SkColor colors[2]; in RadialGradient_create2() local
297 colors[0] = color0; in RadialGradient_create2()
298 colors[1] = color1; in RadialGradient_create2()
300 SkShader* s = SkGradientShader::CreateRadial(center, SkFloatToScalar(radius), colors, NULL, in RadialGradient_create2()
370 const jint* colors = env->GetIntArrayElements(jcolors, NULL); in SweepGradient_create1() local
386 reinterpret_cast<const SkColor*>(colors), in SweepGradient_create1()
[all …]
/frameworks/base/core/java/android/view/
DGLES20RecordingCanvas.java118 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, int width, in drawBitmap() argument
120 super.drawBitmap(colors, offset, stride, x, y, width, height, hasAlpha, paint); in drawBitmap()
125 public void drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, in drawBitmap() argument
127 super.drawBitmap(colors, offset, stride, x, y, width, height, hasAlpha, paint); in drawBitmap()
133 int vertOffset, int[] colors, int colorOffset, Paint paint) { in drawBitmapMesh() argument
135 colors, colorOffset, paint); in drawBitmapMesh()
284 float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, in drawVertices() argument
286 super.drawVertices(mode, vertexCount, verts, vertOffset, texs, texOffset, colors, in drawVertices()
/frameworks/native/cmds/flatland/
DRenderers.cpp22 static float colors[][4] = { variable
33 float* color = colors[g_colorIndex]; in genColor()
34 g_colorIndex = (g_colorIndex + 1) % NELEMS(colors); in genColor()
/frameworks/base/graphics/java/android/graphics/drawable/
DGradientDrawable.java161 public GradientDrawable(Orientation orientation, int[] colors) { in GradientDrawable() argument
162 this(new GradientState(orientation, colors)); in GradientDrawable()
417 public void setColors(int[] colors) { in setColors() argument
418 mGradientState.setColors(colors); in setColors()
701 final int[] colors = st.mColors;
702 if (colors != null) {
744 colors, st.mPositions, Shader.TileMode.CLAMP));
755 level * st.mGradientRadius, colors, null,
764 int[] tempColors = colors;
769 final int length = colors.length;
[all …]

1234