Home
last modified time | relevance | path

Searched refs:palette (Results 1 – 19 of 19) sorted by relevance

/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessor.java29 import androidx.palette.graphics.Palette;
124 Palette palette = paletteBuilder.generate(); in processNotification() local
125 Palette.Swatch backgroundSwatch = findBackgroundSwatch(palette); in processNotification()
142 palette = paletteBuilder.generate(); in processNotification()
143 int foregroundColor = selectForegroundColor(backgroundColor, palette); in processNotification()
155 private int selectForegroundColor(int backgroundColor, Palette palette) { in selectForegroundColor() argument
157 return selectForegroundColorForSwatches(palette.getDarkVibrantSwatch(), in selectForegroundColor()
158 palette.getVibrantSwatch(), in selectForegroundColor()
159 palette.getDarkMutedSwatch(), in selectForegroundColor()
160 palette.getMutedSwatch(), in selectForegroundColor()
[all …]
/frameworks/base/libs/hwui/
DCanvasTransform.cpp116 static BitmapPalette filterPalette(const SkPaint* paint, BitmapPalette palette) { in filterPalette() argument
117 if (palette == BitmapPalette::Unknown || !paint || !paint->getColorFilter()) { in filterPalette()
118 return palette; in filterPalette()
121 SkColor color = palette == BitmapPalette::Light ? SK_ColorWHITE : SK_ColorBLACK; in filterPalette()
132 bool transformPaint(ColorTransform transform, SkPaint* paint, BitmapPalette palette) { in transformPaint() argument
133 palette = filterPalette(paint, palette); in transformPaint()
135 if (palette == BitmapPalette::Light && transform == ColorTransform::Dark) { in transformPaint()
138 if (palette == BitmapPalette::Dark && transform == ColorTransform::Light) { in transformPaint()
DRecordingCanvas.cpp303 BitmapPalette palette) in DrawImage()
304 : image(std::move(image)), x(x), y(y), palette(palette) { in DrawImage()
312 BitmapPalette palette; member
336 BitmapPalette palette) in DrawImageRect()
337 : image(std::move(image)), dst(dst), constraint(constraint), palette(palette) { in DrawImageRect()
347 BitmapPalette palette; member
355 const SkRect& dst, const SkPaint* paint, BitmapPalette palette) in DrawImageLattice()
362 , palette(palette) { in DrawImageLattice()
372 BitmapPalette palette; member
482 , palette(tree->computePalette()) { in DrawVectorDrawable()
[all …]
DRecordingCanvas.h107 void drawImage(sk_sp<const SkImage>, SkScalar, SkScalar, const SkPaint*, BitmapPalette palette);
110 SkCanvas::SrcRectConstraint, BitmapPalette palette);
187 const SkPaint* paint, SrcRectConstraint constraint, BitmapPalette palette);
189 const SkPaint* paint, BitmapPalette palette);
DCanvasTransform.h43 bool transformPaint(ColorTransform transform, SkPaint* paint, BitmapPalette palette);
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/
DTonalTest.java135 for (Tonal.TonalPalette palette : config.getTonalPalettes()) { in tonal_rangeTest()
136 assertTrue("minHue should be >= to 0.", palette.minHue >= 0); in tonal_rangeTest()
137 assertTrue("maxHue should be <= to 360.", palette.maxHue <= 360); in tonal_rangeTest()
139 assertTrue("S should be >= to 0.", palette.s[0] >= 0); in tonal_rangeTest()
140 assertTrue("S should be <= to 1.", palette.s[1] <= 1); in tonal_rangeTest()
142 assertTrue("L should be >= to 0.", palette.l[0] >= 0); in tonal_rangeTest()
143 assertTrue("L should be <= to 1.", palette.l[1] <= 1); in tonal_rangeTest()
/frameworks/base/core/java/com/android/internal/colorextraction/types/
DTonal.java138 TonalPalette palette = findTonalPalette(hsl[0], hsl[1]); in runTonalExtraction() local
139 if (palette == null) { in runTonalExtraction()
145 int fitIndex = bestFit(palette, hsl[0], hsl[1], hsl[2]); in runTonalExtraction()
152 float[] h = fit(palette.h, hsl[0], fitIndex, in runTonalExtraction()
154 float[] s = fit(palette.s, hsl[1], fitIndex, 0.0f, 1.0f); in runTonalExtraction()
155 float[] l = fit(palette.l, hsl[2], fitIndex, 0.0f, 1.0f); in runTonalExtraction()
292 private int[] getColorPalette(TonalPalette palette) { in getColorPalette() argument
293 return getColorPalette(palette.h, palette.s, palette.l); in getColorPalette()
326 private static int bestFit(@NonNull TonalPalette palette, float h, float s, float l) { in bestFit() argument
330 for (int i = 0; i < palette.h.length; i++) { in bestFit()
[all …]
/frameworks/native/opengl/libagl/
Dtexture.cpp485 uint8_t const* const palette = (uint8_t*)data; in decodePalette4() local
491 *p++ = palette[index + 0]; in decodePalette4()
492 *p++ = palette[index + 1]; in decodePalette4()
498 *p++ = palette[index + 0]; in decodePalette4()
499 *p++ = palette[index + 1]; in decodePalette4()
502 *p++ = palette[index + 0]; in decodePalette4()
503 *p++ = palette[index + 1]; in decodePalette4()
509 uint8_t const* const palette = (uint8_t*)data; in decodePalette4() local
515 *p++ = palette[index + 0]; in decodePalette4()
516 *p++ = palette[index + 1]; in decodePalette4()
[all …]
/frameworks/base/libs/hwui/hwui/
DBitmap.h78 BitmapPalette palette = BitmapPalette::Unknown);
123 BitmapPalette palette() { in palette() function
139 Bitmap(GraphicBuffer* buffer, const SkImageInfo& info, BitmapPalette palette);
DBitmap.cpp138 BitmapPalette palette) { in createFrom() argument
141 return sk_sp<Bitmap>(new Bitmap(graphicBuffer.get(), info, palette)); in createFrom()
217 Bitmap::Bitmap(GraphicBuffer* buffer, const SkImageInfo& info, BitmapPalette palette) in Bitmap() argument
222 , mPalette(palette) in Bitmap()
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaRecordingCanvas.cpp190 mRecorder.drawImage(image, left, top, filterBitmap(paint), bitmap.palette()); in drawBitmap()
204 mRecorder.drawImage(image, 0, 0, filterBitmap(paint), bitmap.palette()); in drawBitmap()
218 SkCanvas::kFast_SrcRectConstraint, bitmap.palette()); in drawBitmap()
256 bitmap.palette()); in drawNinePatch()
/frameworks/base/core/java/android/app/
DWallpaperColors.java33 import com.android.internal.graphics.palette.Palette;
34 import com.android.internal.graphics.palette.VariationalKMeansQuantizer;
168 final Palette palette = Palette in fromBitmap() local
177 final ArrayList<Palette.Swatch> swatches = new ArrayList<>(palette.getSwatches()); in fromBitmap()
/frameworks/base/core/java/com/android/internal/graphics/palette/
DQuantizer.java17 package com.android.internal.graphics.palette;
DColorCutQuantizer.java17 package com.android.internal.graphics.palette;
46 import com.android.internal.graphics.palette.Palette.Swatch;
DVariationalKMeansQuantizer.java17 package com.android.internal.graphics.palette;
DTarget.java17 package com.android.internal.graphics.palette;
DPalette.java17 package com.android.internal.graphics.palette;
88 void onGenerated(Palette palette); in onGenerated() argument
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessorTest.java38 import androidx.palette.graphics.Palette;
/frameworks/base/
DApiDocs.bp44 "android-support-v7-palette",