Home
last modified time | relevance | path

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

/frameworks/base/libs/hwui/
DCanvasTransform.cpp135 static BitmapPalette filterPalette(const SkPaint* paint, BitmapPalette palette) { in filterPalette() argument
136 if (palette == BitmapPalette::Unknown || !paint || !paint->getColorFilter()) { in filterPalette()
137 return palette; in filterPalette()
140 SkColor4f color = palette == BitmapPalette::Light ? SkColors::kWhite : SkColors::kBlack; in filterPalette()
152 bool transformPaint(ColorTransform transform, SkPaint* paint, BitmapPalette palette) { in transformPaint() argument
153 palette = filterPalette(paint, palette); in transformPaint()
155 if (palette == BitmapPalette::Light && transform == ColorTransform::Dark) { in transformPaint()
158 if (palette == BitmapPalette::Dark && transform == ColorTransform::Light) { in transformPaint()
DRecordingCanvas.h74 : image(bitmap.makeImage()), palette(bitmap.palette()) { in DrawImagePayload()
83 : image(sk_ref_sp(image)), palette(BitmapPalette::Unknown) {} in DrawImagePayload()
92 BitmapPalette palette; member
DCanvasTransform.h46 bool transformPaint(ColorTransform transform, SkPaint* paint, BitmapPalette palette);
DRecordingCanvas.cpp350 , palette(payload.palette) in DrawImage()
361 BitmapPalette palette; member
387 , palette(payload.palette) in DrawImageRect()
400 BitmapPalette palette; member
426 , palette(payload.palette) { in DrawImageLattice()
437 BitmapPalette palette; member
626 , palette(tree->computePalette()) { in DrawVectorDrawable()
638 BitmapPalette palette; member
1002 using has_palette_helper = decltype(std::declval<T>().palette);
1017 transformPaint(transform, const_cast<SkPaint*>(paint), op->palette); in colorTransformForOp()
/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/base/libs/hwui/hwui/
DBitmap.h87 BitmapPalette palette = BitmapPalette::Unknown);
93 BitmapPalette palette);
152 BitmapPalette palette() { in palette() function
186 BitmapPalette palette);
192 const AHardwareBuffer_Desc& bufferDesc, BitmapPalette palette);
DBitmap.cpp185 BitmapPalette palette) { in createFrom() argument
189 return createFrom(hardwareBuffer, info, bufferDesc, palette); in createFrom()
194 BitmapPalette palette) { in createFrom() argument
199 return createFrom(hardwareBuffer, info, bufferDesc, palette); in createFrom()
203 const AHardwareBuffer_Desc& bufferDesc, BitmapPalette palette) { in createFrom() argument
207 return sk_sp<Bitmap>(new Bitmap(hardwareBuffer, info, rowBytes, palette)); in createFrom()
288 BitmapPalette palette) in Bitmap() argument
292 , mPalette(palette) in Bitmap()
/frameworks/base/core/java/android/app/
DWallpaperColors.java38 import com.android.internal.graphics.palette.CelebiQuantizer;
39 import com.android.internal.graphics.palette.Palette;
40 import com.android.internal.graphics.palette.VariationalKMeansQuantizer;
211 final Palette palette; in fromBitmap() local
213 palette = Palette in fromBitmap()
227 palette = Palette in fromBitmap()
234 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;
DPointProvider.java17 package com.android.internal.graphics.palette;
DCelebiQuantizer.java17 package com.android.internal.graphics.palette;
DContrast.java17 package com.android.internal.graphics.palette;
DQuantizerMap.java17 package com.android.internal.graphics.palette;
DLABPointProvider.java17 package com.android.internal.graphics.palette;
DPalette.java17 package com.android.internal.graphics.palette;
64 void onGenerated(@Nullable Palette palette); in onGenerated() argument
DColorCutQuantizer.java17 package com.android.internal.graphics.palette;
38 import com.android.internal.graphics.palette.Palette.Swatch;
DVariationalKMeansQuantizer.java17 package com.android.internal.graphics.palette;
DTarget.java17 package com.android.internal.graphics.palette;
DWSMeansQuantizer.java17 package com.android.internal.graphics.palette;
DWuQuantizer.java17 package com.android.internal.graphics.palette;
/frameworks/libs/systemui/monet/tests/com/android/systemui/monet/
DColorSchemeTest.kt151 val (paletteName, readable, palette) = it in generateDefaultValues() constant
152 palette.allShadesMapped.entries.forEachIndexed { index, (shade, colorValue) -> in generateDefaultValues()
156 palette.allShadesMapped.entries.size - 1 -> commentBlack(readable) in generateDefaultValues()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/
DSplashscreenContentDrawer.java73 import com.android.internal.graphics.palette.Palette;
74 import com.android.internal.graphics.palette.Quantizer;
75 import com.android.internal.graphics.palette.VariationalKMeansQuantizer;