Home
last modified time | relevance | path

Searched refs:Color (Results 1 – 25 of 421) sorted by relevance

12345678910>>...17

/frameworks/native/services/surfaceflinger/tests/
DLayerRenderTypeTransaction_test.cpp42 Color finalColor);
54 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_P()
60 shot->expectColor(rect, Color::RED); in TEST_P()
61 shot->expectBorder(rect, Color::BLACK); in TEST_P()
69 shot->expectColor(rect, Color::RED); in TEST_P()
70 shot->expectBorder(rect, Color::BLACK); in TEST_P()
77 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_P()
86 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), Color::RED); in TEST_P()
92 getScreenCapture()->expectColor(Rect(1, 1, 33, 33), Color::RED); in TEST_P()
99 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_P()
[all …]
DRelativeZ_test.cpp40 mBackgroundLayer = createColorLayer("Background layer", Color::RED); in SetUp()
43 mForegroundLayer = createColorLayer("Foreground layer", Color::GREEN); in SetUp()
71 createColorLayer("Child layer", Color::BLUE, mBackgroundLayer.get()); in TEST_F()
81 sc->checkPixel(1, 1, Color::BLUE.r, Color::BLUE.g, Color::BLUE.b); in TEST_F()
96 sc->checkPixel(1, 1, Color::GREEN.r, Color::GREEN.g, Color::GREEN.b); in TEST_F()
112 createColorLayer("child level 1", Color::WHITE, mForegroundLayer.get()); in TEST_F()
114 createColorLayer("child level 2a", Color::BLUE, childLevel1.get()); in TEST_F()
116 createColorLayer("child level 2b", Color::BLACK, childLevel1.get()); in TEST_F()
118 createColorLayer("child level 3", Color::GREEN, childLevel2a.get()); in TEST_F()
130 sc->checkPixel(1, 1, Color::GREEN.r, Color::GREEN.g, Color::GREEN.b); in TEST_F()
[all …]
DMirrorLayer_test.cpp34 mParentLayer = createColorLayer("Parent layer", Color::RED); in SetUp()
35 mChildLayer = createColorLayer("Child layer", Color::GREEN, mParentLayer.get()); in SetUp()
58 createColorLayer("Grandchild layer", Color::BLUE, mChildLayer.get()); in TEST_F()
80 shot->expectColor(Rect(550, 550, 750, 750), Color::BLUE); in TEST_F()
82 shot->expectColor(Rect(750, 750, 950, 950), Color::GREEN); in TEST_F()
91 shot->expectColor(Rect(550, 550, 750, 750), Color::WHITE); in TEST_F()
93 shot->expectColor(Rect(750, 750, 950, 950), Color::GREEN); in TEST_F()
102 shot->expectColor(Rect(550, 550, 750, 750), Color::WHITE); in TEST_F()
104 shot->expectColor(Rect(750, 750, 950, 950), Color::BLACK); in TEST_F()
113 shot->expectColor(Rect(550, 550, 750, 750), Color::BLACK); in TEST_F()
[all …]
DLayerTypeAndRenderTypeTransaction_test.cpp64 ASSERT_NO_FATAL_FAILURE(fillLayerColor(layerR, Color::RED, 32, 32)); in TEST_P()
66 ASSERT_NO_FATAL_FAILURE(fillLayerColor(layerG, Color::GREEN, 32, 32)); in TEST_P()
71 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), Color::RED); in TEST_P()
77 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), Color::GREEN); in TEST_P()
86 ASSERT_NO_FATAL_FAILURE(fillLayerColor(layerR, Color::RED, 32, 32)); in TEST_P()
88 ASSERT_NO_FATAL_FAILURE(fillLayerColor(layerG, Color::GREEN, 32, 32)); in TEST_P()
98 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), Color::RED); in TEST_P()
104 ASSERT_NO_FATAL_FAILURE(fillLayerColor(layer, Color::RED, 32, 32)); in TEST_P()
109 getScreenCapture()->expectColor(mDisplayRect, Color::BLACK); in TEST_P()
115 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), Color::RED); in TEST_P()
[all …]
DSetGeometry_test.cpp32 fillBufferQueueLayerColor(mLayer, Color::RED, mLayerWidth, mLayerHeight); in SetUp()
38 sc->expectColor(Rect(0, 0, mLayerWidth, mLayerHeight), Color::RED); in SetUp()
39 sc->expectBorder(Rect(0, 0, mLayerWidth, mLayerHeight), Color::BLACK); in SetUp()
63 sc->expectColor(dest, Color::RED); in TEST_F()
64 sc->expectBorder(dest, Color::BLACK); in TEST_F()
76 sc->expectColor(dest, Color::RED); in TEST_F()
77 sc->expectBorder(dest, Color::BLACK); in TEST_F()
89 sc->expectColor(dest, Color::RED); in TEST_F()
90 sc->expectBorder(dest, Color::BLACK); in TEST_F()
98 sc->expectColor(dest, Color::RED); in TEST_F()
[all …]
DLayerTransaction_test.cpp32 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_F()
51 shot->expectColor(Rect(0, 0, 32, 32), Color::BLACK); in TEST_F()
63 sc.expectColor(Rect(0, 0, 32, 32), Color::RED); in TEST_F()
73 ASSERT_NO_FATAL_FAILURE(fillBufferStateLayerColor(layer, Color::GREEN, 32, 32)); in TEST_F()
90 ASSERT_NO_FATAL_FAILURE(fillBufferQueueLayerColor(layer, Color::RED, 32, 32)); in TEST_F()
99 shot->expectColor(rect, Color::RED); in TEST_F()
100 shot->expectBorder(rect, Color::BLACK); in TEST_F()
166 auto fillAndPostBuffers = [&](const Color& color) { in TEST_F()
187 const std::array<Color, 3> colors = {Color::RED, Color::GREEN, Color::BLUE}; in TEST_F()
DLayerTransactionTest.h89 sp<SurfaceControl> createColorLayer(const char* name, const Color& color,
118 virtual void fillBufferQueueLayerColor(const sp<SurfaceControl>& layer, const Color& color, in fillBufferQueueLayerColor()
128 virtual void fillBufferStateLayerColor(const sp<SurfaceControl>& layer, const Color& color, in fillBufferStateLayerColor()
140 void fillLayerColor(uint32_t mLayerType, const sp<SurfaceControl>& layer, const Color& color, in fillLayerColor()
155 int32_t bufferWidth, int32_t bufferHeight, const Color& topLeft, in fillLayerQuadrant()
156 const Color& topRight, const Color& bottomLeft, in fillLayerQuadrant()
157 const Color& bottomRight) { in fillLayerQuadrant()
173 int32_t bufferHeight, const Color& topLeft, in fillBufferQueueLayerQuadrant()
174 const Color& topRight, const Color& bottomLeft, in fillBufferQueueLayerQuadrant()
175 const Color& bottomRight) { in fillBufferQueueLayerQuadrant()
[all …]
DEffectLayer_test.cpp34 mParentLayer = createColorLayer("Parent layer", Color::RED); in SetUp()
65 shot->expectColor(Rect(0, 0, 400, 400), Color::BLACK); in TEST_F()
86 shot->expectColor(Rect(0, 0, 400, 400), Color::RED); in TEST_F()
102 half3{Color::GREEN.r / 255.0f, Color::GREEN.g / 255.0f, in TEST_F()
103 Color::GREEN.b / 255.0f}); in TEST_F()
110 shot->expectColor(Rect(0, 0, 400, 400), Color::GREEN); in TEST_F()
/frameworks/base/libs/hwui/utils/
DColor.h33 namespace Color {
34 enum Color { enum
66 static_assert(Color::White == SK_ColorWHITE, "color format has changed");
67 static_assert(Color::Black == SK_ColorBLACK, "color format has changed");
70 static const Color::Color BrightColors[] = {
71 Color::Red_500, Color::Pink_500, Color::Purple_500, Color::DeepPurple_500,
72 Color::Indigo_500, Color::Blue_500, Color::LightBlue_500, Color::Cyan_500,
73 Color::Teal_500, Color::Green_500, Color::LightGreen_500, Color::Lime_500,
74 Color::Yellow_500, Color::Amber_500, Color::Orange_500, Color::DeepOrange_500,
75 Color::Brown_500, Color::Grey_500, Color::BlueGrey_500,
[all …]
/frameworks/native/services/surfaceflinger/tests/utils/
DColorUtils.h24 struct Color { struct
30 static const Color RED; argument
31 static const Color GREEN; argument
32 static const Color BLUE; argument
33 static const Color WHITE; argument
34 static const Color BLACK; argument
35 static const Color TRANSPARENT; argument
38 const Color Color::RED{255, 0, 0, 255};
39 const Color Color::GREEN{0, 255, 0, 255};
40 const Color Color::BLUE{0, 0, 255, 255};
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DScrimState.java19 import android.graphics.Color;
42 mFrontTint = Color.BLACK; in prepare()
43 mBehindTint = Color.BLACK; in prepare()
79 mFrontTint = Color.BLACK; in prepare()
80 mBehindTint = Color.BLACK; in prepare()
81 mBubbleTint = Color.TRANSPARENT; in prepare()
135 mFrontTint = Color.BLACK; in prepare()
138 mBehindTint = Color.BLACK; in prepare()
141 mBubbleTint = Color.TRANSPARENT; in prepare()
169 mBehindTint = Color.BLACK; in prepare()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
DClockPalette.kt19 import android.graphics.Color
32 private var accentPrimary: Int = Color.WHITE
33 private var accentSecondaryLight: Int = Color.WHITE
34 private var accentSecondaryDark: Int = Color.BLACK
46 Color.colorToHSV(accentSecondaryLight, lightHSV) in getSecondaryColor()
47 Color.colorToHSV(accentSecondaryDark, darkHSV) in getSecondaryColor()
51 return Color.HSVToColor(hsv) in getSecondaryColor()
57 accentPrimary = Color.WHITE in setColorPalette()
58 accentSecondaryLight = Color.WHITE in setColorPalette()
59 accentSecondaryDark = if (supportsDarkText) Color.BLACK else Color.WHITE in setColorPalette()
/frameworks/base/tests/Internal/src/android/app/
DWallpaperColorsTest.java21 import android.graphics.Color;
37 final Color color = Color.valueOf(Color.WHITE); in supportsDarkTextOverrideTest()
57 canvas.drawColor(Color.WHITE); in colorHintsTest()
67 canvas.drawColor(Color.BLACK); in colorHintsTest()
76 paint.setColor(Color.BLACK); in colorHintsTest()
77 canvas.drawColor(Color.WHITE); in colorHintsTest()
84 WallpaperColors colors = new WallpaperColors(Color.valueOf(Color.GREEN), null, null); in colorHintsTest()
92 final Color color = Color.valueOf(Color.BLACK); in darkMainColorSupportsDarkTheme()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationUtils.java23 import android.graphics.Color;
55 return Color.argb( in interpolateColors()
56 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount), in interpolateColors()
57 (int) interpolate(Color.red(startColor), Color.red(endColor), amount), in interpolateColors()
58 (int) interpolate(Color.green(startColor), Color.green(endColor), amount), in interpolateColors()
59 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount)); in interpolateColors()
DImageGradientColorizer.java21 import android.graphics.Color;
53 int tri = Color.red(backgroundColor); in colorize()
54 int tgi = Color.green(backgroundColor); in colorize()
55 int tbi = Color.blue(backgroundColor); in colorize()
73 new int[] {0, Color.argb(0.5f, 1, 1, 1), Color.BLACK}, in colorize()
95 new int[] {0, Color.argb(0.5f, 1, 1, 1), Color.BLACK}, in colorize()
/frameworks/base/core/java/com/android/internal/graphics/
DColorUtils.java23 import android.graphics.Color;
49 int bgAlpha = Color.alpha(background); in compositeColors()
50 int fgAlpha = Color.alpha(foreground); in compositeColors()
53 int r = compositeComponent(Color.red(foreground), fgAlpha, in compositeColors()
54 Color.red(background), bgAlpha, a); in compositeColors()
55 int g = compositeComponent(Color.green(foreground), fgAlpha, in compositeColors()
56 Color.green(background), bgAlpha, a); in compositeColors()
57 int b = compositeComponent(Color.blue(foreground), fgAlpha, in compositeColors()
58 Color.blue(background), bgAlpha, a); in compositeColors()
60 return Color.argb(a, r, g, b); in compositeColors()
[all …]
/frameworks/base/core/java/android/app/
DWallpaperColors.java24 import android.graphics.Color;
97 private final ArrayList<Color> mMainColors;
105 Color color = Color.valueOf(colorInt); in WallpaperColors()
183 Color primary = null, secondary = null, tertiary = null; in fromBitmap()
187 Color color = Color.valueOf(swatches.get(i).getRgb()); in fromBitmap()
222 public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor, in WallpaperColors()
223 @Nullable Color tertiaryColor) { in WallpaperColors()
248 public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor, in WallpaperColors()
249 @Nullable Color tertiaryColor, int colorHints) { in WallpaperColors()
290 List<Color> mainColors = getMainColors(); in writeToParcel()
[all …]
/frameworks/base/tests/Internal/src/com/android/internal/graphics/
DColorUtilsTest.java21 import android.graphics.Color;
33 int alpha = ColorUtils.calculateMinimumBackgroundAlpha(Color.WHITE, Color.BLACK, 4.5f); in calculateMinimumBackgroundAlpha_satisfiestContrast()
36 int worstCase = ColorUtils.blendARGB(Color.WHITE, Color.BLACK, alpha/255f); in calculateMinimumBackgroundAlpha_satisfiestContrast()
38 double contrast = ColorUtils.calculateContrast(Color.WHITE, worstCase); in calculateMinimumBackgroundAlpha_satisfiestContrast()
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/
DColorExtractorTest.java29 import android.graphics.Color;
71 colorsExpectedNormal.setMainColor(Color.RED); in getColors_usesExtractedColors()
72 colorsExpectedNormal.setSecondaryColor(Color.GRAY); in getColors_usesExtractedColors()
75 colorsExpectedNormal.setMainColor(Color.BLACK); in getColors_usesExtractedColors()
76 colorsExpectedNormal.setSecondaryColor(Color.BLUE); in getColors_usesExtractedColors()
79 colorsExpectedNormal.setMainColor(Color.MAGENTA); in getColors_usesExtractedColors()
80 colorsExpectedNormal.setSecondaryColor(Color.GREEN); in getColors_usesExtractedColors()
108 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener()
114 extractor.onColorsChanged(new WallpaperColors(Color.valueOf(Color.RED), null, null), in addOnColorsChangedListener_invokesListener()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/
DUtilities.java19 import android.graphics.Color;
36 float bgR = Color.red(bg) / 255f; in computeContrastBetweenColors()
37 float bgG = Color.green(bg) / 255f; in computeContrastBetweenColors()
38 float bgB = Color.blue(bg) / 255f; in computeContrastBetweenColors()
44 float fgR = Color.red(fg) / 255f; in computeContrastBetweenColors()
45 float fgG = Color.green(fg) / 255f; in computeContrastBetweenColors()
46 float fgB = Color.blue(fg) / 255f; in computeContrastBetweenColors()
/frameworks/base/libs/hwui/tests/common/scenes/
DRecentsAnimation.cpp32 Color::Red_500, Color::Purple_500, Color::Blue_500, Color::Green_500, in createContent()
38 renderer.drawColor(Color::White, SkBlendMode::kSrcOver); in createContent()
64 mThumbnail.eraseColor(TestUtils::interpolateColor(curFrame / 150.0f, Color::Green_500, in doFrame()
65 Color::DeepOrange_500)); in doFrame()
77 canvas.drawColor(Color::Grey_200, SkBlendMode::kSrcOver); in createCard()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
DDuotoneFilter.java27 import android.graphics.Color;
112 float first[] = { Color.red(mFirstColor)/255f, in updateParameters()
113 Color.green(mFirstColor)/255f, in updateParameters()
114 Color.blue(mFirstColor)/255f }; in updateParameters()
115 float second[] = { Color.red(mSecondColor)/255f, in updateParameters()
116 Color.green(mSecondColor)/255f, in updateParameters()
117 Color.blue(mSecondColor)/255f }; in updateParameters()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessorTest.java33 import android.graphics.Color;
132 canvas.drawColor(Color.WHITE); in findBackgroundSwatch_white()
136 assertCloseColors(swatch.getRgb(), Color.WHITE); in findBackgroundSwatch_white()
144 canvas.drawColor(Color.RED); in findBackgroundSwatch_red()
148 assertCloseColors(swatch.getRgb(), Color.RED); in findBackgroundSwatch_red()
152 assertThat((float) Color.red(expected)).isWithin(COLOR_TOLERANCE).of(Color.red(actual)); in assertCloseColors()
153 assertThat((float) Color.green(expected)).isWithin(COLOR_TOLERANCE).of(Color.green(actual)); in assertCloseColors()
154 assertThat((float) Color.blue(expected)).isWithin(COLOR_TOLERANCE).of(Color.blue(actual)); in assertCloseColors()
/frameworks/layoutlib/bridge/src/android/graphics/
DColor_Delegate.java31 java.awt.Color.RGBtoHSB(red, greed, blue, hsv); in nativeRGBToHSV()
37 …java.awt.Color rgb = new java.awt.Color(java.awt.Color.HSBtoRGB(hsv[0] / 360, pin(hsv[1]), pin(hsv… in nativeHSVToColor()
38 return Color.argb(alpha, rgb.getRed(), rgb.getGreen(), rgb.getBlue()); in nativeHSVToColor()
/frameworks/base/core/java/android/view/accessibility/
DCaptioningManager.java26 import android.graphics.Color;
366 this.foregroundColor = mHasForegroundColor ? foregroundColor : Color.WHITE; in CaptionStyle()
367 this.backgroundColor = mHasBackgroundColor ? backgroundColor : Color.BLACK; in CaptionStyle()
369 this.edgeColor = mHasEdgeColor ? edgeColor : Color.BLACK; in CaptionStyle()
499 WHITE_ON_BLACK = new CaptionStyle(Color.WHITE, Color.BLACK, EDGE_TYPE_NONE,
500 Color.BLACK, COLOR_NONE_OPAQUE, null);
501 BLACK_ON_WHITE = new CaptionStyle(Color.BLACK, Color.WHITE, EDGE_TYPE_NONE,
502 Color.BLACK, COLOR_NONE_OPAQUE, null);
503 YELLOW_ON_BLACK = new CaptionStyle(Color.YELLOW, Color.BLACK, EDGE_TYPE_NONE,
504 Color.BLACK, COLOR_NONE_OPAQUE, null);
[all …]

12345678910>>...17