Searched refs:colors (Results 1 - 25 of 113) sorted by relevance

12345

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/colorextraction/
H A DSysuiColorExtractorTests.java51 ColorExtractor.GradientColors colors = new ColorExtractor.GradientColors();
52 colors.setMainColor(Color.RED);
53 colors.setSecondaryColor(Color.RED);
55 SysuiColorExtractor extractor = getTestableExtractor(colors);
71 ColorExtractor.GradientColors colors = new ColorExtractor.GradientColors();
72 colors.setMainColor(Color.RED);
73 colors.setSecondaryColor(Color.RED);
75 SysuiColorExtractor extractor = getTestableExtractor(colors);
81 assertEquals("Not using extracted colors!",
82 extractor.getColors(which, type), colors);
108 getTestableExtractor(ColorExtractor.GradientColors colors) argument
[all...]
/frameworks/base/core/java/android/app/
H A DIWallpaperManagerCallback.aidl35 * Called when wallpaper colors change
37 void onWallpaperColorsChanged(in WallpaperColors colors, int which, int userId);
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
H A DTonalCompat.java32 public ExtractionInfo extractDarkColors(WallpaperColors colors) { argument
34 mTonal.extractInto(colors, new GradientColors(), darkColors, new GradientColors());
40 if (colors != null) {
42 (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0;
/frameworks/base/libs/hwui/
H A DGradientCache.h39 colors = nullptr;
43 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { argument
44 copy(colors, positions, count);
48 copy(entry.colors.get(), entry.positions.get(), entry.count);
53 copy(entry.colors.get(), entry.positions.get(), entry.count);
67 std::unique_ptr<uint32_t[]> colors; member in struct:android::uirenderer::GradientCacheEntry
72 void copy(uint32_t* colors, float* positions, uint32_t count) { argument
74 this->colors.reset(new uint32_t[count]);
77 memcpy(this->colors.get(), colors, coun
[all...]
H A DNinePatchUtils.h58 SkColor* colors) {
60 lattice->fColors = colors;
62 sk_bzero(colors, numFlags * sizeof(SkColor));
71 colors += lattice->fXCount + 1;
82 colors++;
92 *colors = currentColor;
97 colors++;
56 SetLatticeFlags(SkCanvas::Lattice* lattice, SkCanvas::Lattice::RectType* flags, int numFlags, const Res_png_9patch& chunk, SkColor* colors) argument
H A DGradientCache.cpp46 hash = JenkinsHashMix(hash, android::hash_type(colors[i]));
56 deltaInt = memcmp(lhs.colors.get(), rhs.colors.get(), lhs.count * sizeof(uint32_t));
110 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { argument
111 GradientCacheEntry gradient(colors, positions, count);
115 texture = addLinearGradient(gradient, colors, positions, count);
125 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, GradientInfo& info) { argument
137 if (((colors[i] >> 24) & 0xff) < 255) {
147 Texture* GradientCache::addLinearGradient(GradientCacheEntry& gradient, uint32_t* colors, argument
150 getGradientInfo(colors, coun
217 generateTexture(uint32_t* colors, float* positions, const uint32_t width, const uint32_t height, Texture* texture) argument
[all...]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DGradientStopsActivity.java45 int[] colors = new int[] { 0xffff0000, 0xff0000ff };
48 colors, positions, Shader.TileMode.CLAMP);
55 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 };
58 colors, positions, Shader.TileMode.CLAMP);
65 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 };
68 colors, positions, Shader.TileMode.CLAMP);
75 colors = new int[] { 0xff000000, 0xffffffff };
77 colors, null, Shader.TileMode.CLAMP);
85 colors, null, Shader.TileMode.REPEAT);
93 colors, nul
[all...]
/frameworks/base/core/java/android/service/wallpaper/
H A DIWallpaperConnection.aidl30 void onWallpaperColorsChanged(in WallpaperColors colors);
/frameworks/base/libs/hwui/tests/unit/
H A DGradientCacheTests.cpp31 SkColor colors[] = {0xFF00FF00, 0xFFFF0000, 0xFF0000FF}; local
33 Texture* texture = cache.get(colors, positions, 3);
/frameworks/base/core/tests/coretests/src/android/graphics/
H A DBitmapTest.java82 int[] colors = new int[100];
84 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i;
87 Bitmap bm = Bitmap.createBitmap(colors, 10, 10,
99 assertEquals("getPixel", p, colors[i]);
108 int[] colors = new int[100];
110 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i;
113 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, Bitmap.Config.RGB_565);
125 int[] colors = new int[100];
127 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i;
131 Bitmap bm1 = Bitmap.createBitmap(colors, 1
[all...]
/frameworks/layoutlib/bridge/src/android/graphics/
H A DGradient_Delegate.java45 * @param colors The colors to be distributed along the gradient line
47 * corresponding color in the colors array. If this is null, the
48 * the colors are distributed evenly along the gradient line.
50 protected Gradient_Delegate(long nativeMatrix, int colors[], float positions[]) { argument
52 assert colors.length >= 2 : "needs >= 2 number of colors";
55 float spacing = 1.f / (colors.length - 1);
56 positions = new float[colors.length];
58 positions[colors
84 GradientPaint(int[] colors, float[] positions, TileMode tileMode) argument
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DRadialGradient.java50 * @param colors The colors to be distributed between the center and edge of the circle
53 * the colors array. If <code>null</code>, colors are distributed evenly
58 @NonNull @ColorInt int colors[], @Nullable float stops[],
63 if (colors.length < 2) {
64 throw new IllegalArgumentException("needs >= 2 number of colors");
66 if (stops != null && colors.length != stops.length) {
73 mColors = colors.clone();
130 int colors[], floa
57 RadialGradient(float centerX, float centerY, float radius, @NonNull @ColorInt int colors[], @Nullable float stops[], @NonNull TileMode tileMode) argument
129 nativeCreate1(long matrix, float x, float y, float radius, int colors[], float positions[], int tileMode) argument
[all...]
H A DSweepGradient.java46 * @param colors The colors to be distributed between around the center.
47 * There must be at least 2 colors in the array.
49 * each corresponding color in the colors array, beginning
52 * If positions is NULL, then the colors are automatically
56 @NonNull @ColorInt int colors[], @Nullable float positions[]) {
57 if (colors.length < 2) {
58 throw new IllegalArgumentException("needs >= 2 number of colors");
60 if (positions != null && colors.length != positions.length) {
67 mColors = colors
55 SweepGradient(float cx, float cy, @NonNull @ColorInt int colors[], @Nullable float positions[]) argument
114 nativeCreate1(long matrix, float x, float y, int colors[], float positions[]) argument
[all...]
H A DLinearGradient.java52 * @param colors The colors to be distributed along the gradient line
54 * each corresponding color in the colors array. If this is null,
55 * the the colors are distributed evenly along the gradient line.
58 public LinearGradient(float x0, float y0, float x1, float y1, @NonNull @ColorInt int colors[], argument
60 if (colors.length < 2) {
61 throw new IllegalArgumentException("needs >= 2 number of colors");
63 if (positions != null && colors.length != positions.length) {
71 mColors = colors.clone();
130 int colors[], floa
129 nativeCreate1(long matrix, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
[all...]
/frameworks/base/tests/Internal/src/android/app/
H A DWallpaperColorsTest.java38 WallpaperColors colors = new WallpaperColors(color, null, null, 0);
40 (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0);
43 colors = new WallpaperColors(color, null, null, WallpaperColors.HINT_SUPPORTS_DARK_TEXT);
45 (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0);
83 WallpaperColors colors = new WallpaperColors(Color.valueOf(Color.GREEN), null, null);
84 fromBitmap = (colors.getColorHints() & WallpaperColors.HINT_FROM_BITMAP) != 0;
/frameworks/base/libs/hwui/tests/common/scenes/
H A DHwBitmapInCompositeShader.cpp58 SkColor colors[2]; variable
59 colors[0] = Color::Black;
60 colors[1] = Color::White;
62 center, 50, colors, nullptr, 2, SkShader::TileMode::kRepeat_TileMode);
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/
H A DSpeechOrbView.java54 * @param colors SearchOrbView.Colors.
56 public void setListeningOrbColors(Colors colors) { argument
57 mListeningOrbColors = colors;
63 * @param colors SearchOrbView.Colors.
65 public void setNotListeningOrbColors(Colors colors) { argument
66 mNotListeningOrbColors = colors;
/frameworks/base/core/java/com/android/internal/graphics/palette/
H A DColorCutQuantizer.java53 * colors rather than representation colors.
57 * requested number of colors. An average color is then generated from each cube.
61 * This means that the color space is divided into distinct colors, rather than representative
62 * colors.
88 * @param maxColors The maximum number of colors that should be in the result palette.
108 // Now let's count the number of distinct colors
122 mTimingLogger.addSplit("Filtered colors and distinct colors counted");
125 // Now lets go through create an array consisting of only distinct colors
[all...]
/frameworks/support/palette/src/main/java/androidx/palette/graphics/
H A DColorCutQuantizer.java34 * colors rather than representation colors.
38 * requested number of colors. An average color is then generated from each cube.
42 * This means that the color space is divided into distinct colors, rather than representative
43 * colors.
69 * @param maxColors The maximum number of colors that should be in the result palette.
90 // Now let's count the number of distinct colors
104 mTimingLogger.addSplit("Filtered colors and distinct colors counted");
107 // Now lets go through create an array consisting of only distinct colors
[all...]
/frameworks/layoutlib/bridge/src/android/view/
H A DRectShadowPainter.java79 int[] colors = {START_COLOR, START_COLOR, END_COLOR};
81 // Correct colors using the given component alpha
82 for (int i = 0; i < colors.length; i++) {
83 colors[i] = Color.argb((int) (Color.alpha(colors[i]) * alpha), Color.red(colors[i]),
84 Color.green(colors[i]), Color.blue(colors[i]));
87 cornerPaint.setShader(new RadialGradient(0, 0, outerArcRadius, colors,
89 edgePaint.setShader(new LinearGradient(0, 0, -shadowSize, 0, colors[
[all...]
/frameworks/opt/colorpicker/src/com/android/colorpicker/
H A DColorPickerDialog.java31 * A dialog which takes in as input an array of colors and creates a palette allowing the user to
42 protected static final String KEY_COLORS = "colors";
64 public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor, argument
67 ret.initialize(titleResId, colors, selectedColor, columns, size);
71 public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size) { argument
73 setColors(colors, selectedColor);
163 public void setColors(int[] colors, int selectedColor) { argument
164 if (mColors != colors || mSelectedColor != selectedColor) {
165 mColors = colors;
171 public void setColors(int[] colors) { argument
[all...]
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/
H A DColorExtractorTest.java88 GradientColors colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM,
90 assertEquals("Extracted colors not being used!", colors, colorsExpectedNormal);
91 colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM, ColorExtractor.TYPE_DARK);
92 assertEquals("Extracted colors not being used!", colors, colorsExpectedDark);
93 colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM, ColorExtractor.TYPE_EXTRA_DARK);
94 assertEquals("Extracted colors not being used!", colors, colorsExpectedExtraDark);
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/
H A DCube.java44 int colors[] = {
78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4);
81 mColorBuffer.put(colors);
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/
H A DThemeUtils.java46 final int[] colors = new int[2];
51 colors[i] = disabledTextColor;
56 colors[i] = textColor;
59 return new ColorStateList(states, colors);
/frameworks/base/core/java/com/android/internal/colorextraction/
H A DColorExtractor.java38 * Class to process wallpaper colors and generate a tonal palette based on them.
68 GradientColors[] colors = new GradientColors[sGradientTypes.length];
69 mGradientColors.append(which, colors);
71 colors[type] = new GradientColors();
85 // Initialize all gradients with the current colors
92 // Initialize all gradients with the current colors
104 * Retrieve gradient colors for a specific wallpaper.
107 * @return colors
115 * Get current gradient colors for one of the possible gradient types
119 * @return colors
151 onColorsChanged(WallpaperColors colors, int which) argument
[all...]

Completed in 953 milliseconds

12345