Home
last modified time | relevance | path

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

1234567

/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/libs/hwui/
DGradientCache.h37 colors = nullptr; in GradientCacheEntry()
41 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { in GradientCacheEntry()
42 copy(colors, positions, count); in GradientCacheEntry()
46 copy(entry.colors.get(), entry.positions.get(), entry.count); in GradientCacheEntry()
51 copy(entry.colors.get(), entry.positions.get(), entry.count);
69 std::unique_ptr<uint32_t[]> colors; member
74 void copy(uint32_t* colors, float* positions, uint32_t count) { in copy()
76 this->colors.reset(new uint32_t[count]); in copy()
79 memcpy(this->colors.get(), colors, count * sizeof(uint32_t)); in copy()
118 Texture* get(uint32_t* colors, float* positions, int count);
[all …]
DGradientCache.cpp45 hash = JenkinsHashMix(hash, android::hash_type(colors[i])); in hash()
55 deltaInt = memcmp(lhs.colors.get(), rhs.colors.get(), lhs.count * sizeof(uint32_t)); in compare()
108 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { in get() argument
109 GradientCacheEntry gradient(colors, positions, count); in get()
113 texture = addLinearGradient(gradient, colors, positions, count); in get()
123 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, in getGradientInfo() argument
136 if (((colors[i] >> 24) & 0xff) < 255) { in getGradientInfo()
147 uint32_t* colors, float* positions, int count) { in addLinearGradient() argument
150 getGradientInfo(colors, count, info); in addLinearGradient()
165 generateTexture(colors, positions, info.width, 2, texture); in addLinearGradient()
[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 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()
DRadialGradient_Delegate.java60 int colors[], float positions[], int tileMode) { in nativeCreate1() argument
62 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1()
89 private RadialGradient_Delegate(float x, float y, float radius, int colors[], float positions[], in RadialGradient_Delegate() argument
91 super(colors, positions); in RadialGradient_Delegate()
102 int[] colors, float[] positions, TileMode mode) { in RadialGradientPaint() argument
103 super(colors, positions, mode); in RadialGradientPaint()
DLinearGradient_Delegate.java61 int colors[], float positions[], int tileMode) { in nativeCreate1() argument
63 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1()
92 int colors[], float positions[], TileMode tile) { in LinearGradient_Delegate() argument
93 super(colors, positions); in LinearGradient_Delegate()
111 public LinearGradientPaint(float x0, float y0, float x1, float y1, int colors[], in LinearGradientPaint() argument
113 super(colors, positions, tile); in LinearGradientPaint()
/frameworks/opt/colorpicker/src/com/android/colorpicker/
DColorPickerDialog.java64 public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor, in newInstance() argument
67 ret.initialize(titleResId, colors, selectedColor, columns, size); in newInstance()
71 public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size) { in initialize() argument
73 setColors(colors, selectedColor); in initialize()
163 public void setColors(int[] colors, int selectedColor) { in setColors() argument
164 if (mColors != colors || mSelectedColor != selectedColor) { in setColors()
165 mColors = colors; in setColors()
171 public void setColors(int[] colors) { in setColors() argument
172 if (mColors != colors) { in setColors()
173 mColors = colors; in setColors()
DColorPickerPalette.java84 public void drawPalette(int[] colors, int selectedColor) { in drawPalette() argument
85 drawPalette(colors, selectedColor, null); in drawPalette()
91 public void drawPalette(int[] colors, int selectedColor, String[] colorContentDescriptions) { in drawPalette() argument
92 if (colors == null) { in drawPalette()
103 for (int color : colors) { in drawPalette()
/frameworks/base/graphics/java/android/graphics/
DSweepGradient.java52 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
DRadialGradient.java55 @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
DLinearGradient.java52 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
/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/support/v7/palette/src/main/java/android/support/v7/graphics/
DColorCutQuantizer.java106 final int[] colors = mColors = new int[distinctColorCount]; in ColorCutQuantizer() local
110 colors[distinctColorIndex++] = color; in ColorCutQuantizer()
121 for (int color : colors) { in ColorCutQuantizer()
196 ArrayList<Swatch> colors = new ArrayList<>(vboxes.size()); in generateAverageColors() local
202 colors.add(swatch); in generateAverageColors()
205 return colors; in generateAverageColors()
245 final int[] colors = mColors; in fitBox() local
256 final int color = colors[i]; in fitBox()
341 final int[] colors = mColors; in findSplitPoint() local
347 modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex); in findSplitPoint()
[all …]
/frameworks/base/core/jni/android/graphics/
DShader.cpp142 SkColor colors[2]; in LinearGradient_create2() local
143 colors[0] = color0; in LinearGradient_create2()
144 colors[1] = color1; in LinearGradient_create2()
146 … SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode); in LinearGradient_create2()
184 SkColor colors[2]; in RadialGradient_create2() local
185 colors[0] = color0; in RadialGradient_create2()
186 colors[1] = color1; in RadialGradient_create2()
188 SkShader* s = SkGradientShader::CreateRadial(center, radius, colors, NULL, 2, in RadialGradient_create2()
199 const jint* colors = env->GetIntArrayElements(jcolors, NULL); in SweepGradient_create1() local
209 reinterpret_cast<const SkColor*>(colors), pos, count); in SweepGradient_create1()
[all …]
/frameworks/support/design/base/android/support/design/widget/
DCircularBorderDrawable.java187 final int[] colors = new int[6]; in createGradientShader() local
188 colors[0] = ColorUtils.compositeColors(mTopOuterStrokeColor, mCurrentBorderTintColor); in createGradientShader()
189 colors[1] = ColorUtils.compositeColors(mTopInnerStrokeColor, mCurrentBorderTintColor); in createGradientShader()
190 colors[2] = ColorUtils.compositeColors( in createGradientShader()
192 colors[3] = ColorUtils.compositeColors( in createGradientShader()
194 colors[4] = ColorUtils.compositeColors(mBottomInnerStrokeColor, mCurrentBorderTintColor); in createGradientShader()
195 colors[5] = ColorUtils.compositeColors(mBottomOuterStrokeColor, mCurrentBorderTintColor); in createGradientShader()
208 colors, positions, in createGradientShader()
/frameworks/base/core/java/android/content/res/
DColorStateList.java153 public ColorStateList(int[][] states, @ColorInt int[] colors) { in ColorStateList() argument
155 mColors = colors; in ColorStateList()
288 final int[] colors = new int[mColors.length]; in withAlpha() local
289 final int len = colors.length; in withAlpha()
291 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24); in withAlpha()
294 return new ColorStateList(mStateSpecs, colors); in withAlpha()
633 final int[] colors = mColors; in onColorsChanged() local
636 defaultColor = colors[0]; in onColorsChanged()
640 defaultColor = colors[i]; in onColorsChanged()
646 if (Color.alpha(colors[i]) != 0xFF) { in onColorsChanged()
[all …]
/frameworks/base/docs/html/topic/performance/
Dnetwork-xfer.jd54 colors used in each row of pixels that comprises the image. By using fewer
55 colors, you improve the compression potential at all of the other stages of
60 Reducing the number of unique colors makes a significant difference because PNG
62 horizontally adjacent pixel colors vary. Thus, reducing the number of unique
63 colors in each row of your PNG images can help in reducing their file sizes.
68 reducing the number of unique colors effectively amounts to applying a lossy
84 Any attempt at color reduction should start with trying to optimize your colors
86 INDEXED color mode works by choosing the best 256 colors to use, and replacing
88 reduction from 16 million (potential) colors to only 256 colors: from 3 (without
119 Of course, not every image can be accurately represented with only 256 colors.
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DThemeUtils.java45 final int[] colors = new int[2]; in createDisabledStateList() local
50 colors[i] = disabledTextColor; in createDisabledStateList()
55 colors[i] = textColor; in createDisabledStateList()
58 return new ColorStateList(states, colors); in createDisabledStateList()
/frameworks/opt/setupwizard/library/eclair-mr1/src/com/android/setupwizardlib/view/
DNavigationBarButton.java77 public void setTextColor(ColorStateList colors) { in setTextColor() argument
78 super.setTextColor(colors); in setTextColor()
138 public void setTintListCompat(ColorStateList colors) { in setTintListCompat() argument
139 mTintList = colors; in setTintListCompat()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/
DCube.java44 int colors[] = { in Cube() local
78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); in Cube()
81 mColorBuffer.put(colors); in Cube()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DTitleView.java78 public void setSearchAffordanceColors(SearchOrbView.Colors colors) {
79 TitleView.this.setSearchAffordanceColors(colors);
165 public void setSearchAffordanceColors(SearchOrbView.Colors colors) { in setSearchAffordanceColors() argument
166 mSearchOrbView.setOrbColors(colors); in setSearchAffordanceColors()
/frameworks/base/libs/hwui/tests/unit/
DGradientCacheTests.cpp31 SkColor colors[] = { 0xFF00FF00, 0xFFFF0000, 0xFF0000FF }; in RENDERTHREAD_TEST() local
33 Texture* texture = cache.get(colors, positions, 3); in RENDERTHREAD_TEST()
/frameworks/support/design/gingerbread/android/support/design/widget/
DFloatingActionButtonGingerbread.java280 final int[] colors = new int[3]; in createColorStateList() local
284 colors[i] = selectedColor; in createColorStateList()
288 colors[i] = selectedColor; in createColorStateList()
293 colors[i] = Color.TRANSPARENT; in createColorStateList()
296 return new ColorStateList(states, colors); in createColorStateList()

1234567