/frameworks/base/graphics/java/android/graphics/ |
D | Color.java | 453 float[] color = new float[] { in convert() local 456 connector.transform(color); in convert() 457 return new Color(color, colorSpace); in convert() 476 float[] color = new float[] { in toArgb() local 480 ColorSpace.connect(mColorSpace).transform(color); in toArgb() 482 return ((int) (color[3] * 255.0f + 0.5f) << 24) | in toArgb() 483 ((int) (color[0] * 255.0f + 0.5f) << 16) | in toArgb() 484 ((int) (color[1] * 255.0f + 0.5f) << 8) | in toArgb() 485 (int) (color[2] * 255.0f + 0.5f); in toArgb() 646 Color color = (Color) o; in equals() [all …]
|
/frameworks/base/core/java/com/android/internal/graphics/palette/ |
D | ColorCutQuantizer.java | 110 for (int color = 0; color < hist.length; color++) { in quantize() 111 if (hist[color] > 0 && shouldIgnoreColor(color)) { in quantize() 113 hist[color] = 0; in quantize() 115 if (hist[color] > 0) { in quantize() 128 for (int color = 0; color < hist.length; color++) { in quantize() 129 if (hist[color] > 0) { in quantize() 130 colors[distinctColorIndex++] = color; in quantize() 141 for (int color : colors) { in quantize() 142 mQuantizedColors.add(new Swatch(approximateToRgb888(color), hist[color])); in quantize() 276 final int color = colors[i]; in fitBox() local [all …]
|
/frameworks/base/libs/hwui/ |
D | CanvasTransform.cpp | 35 static SkColor makeLight(SkColor color) { in makeLight() argument 36 Lab lab = sRGBToLab(color); in makeLight() 40 return LabToSRGB(lab, SkColorGetA(color)); in makeLight() 42 return color; in makeLight() 46 static SkColor makeDark(SkColor color) { in makeDark() argument 47 Lab lab = sRGBToLab(color); in makeDark() 51 return LabToSRGB(lab, SkColorGetA(color)); in makeDark() 53 return color; in makeDark() 57 static SkColor transformColor(ColorTransform transform, SkColor color) { in transformColor() argument 60 return makeLight(color); in transformColor() [all …]
|
/frameworks/rs/tests/java_api/LivePreview/src/com/android/rs/livepreview/ |
D | yuv.rscript | 14 static float4 crossProcess(float4 color) { 18 if (color.r < 0.5f) { 19 v = color.r; 22 v = 1.0f - color.r; 26 if (color.g < 0.5f) { 27 v = color.g; 30 v = 1.0f - color.g; 34 ncolor.b = color.b * 0.5f + 0.25f; 35 ncolor.a = color.a; 39 static uchar4 crossProcess_i(uchar4 color) { [all …]
|
/frameworks/wilhelm/src/itf/ |
D | ILEDArray.cpp | 63 SLHSL color = *pColor; in ILEDArray_SetColor() local 64 if (!(0 <= color.hue && color.hue <= 360000)) in ILEDArray_SetColor() 66 if (!(0 <= color.saturation && color.saturation <= 1000)) in ILEDArray_SetColor() 68 if (!(0 <= color.lightness && color.lightness <= 1000)) in ILEDArray_SetColor() 73 thiz->mColors[index] = color; in ILEDArray_SetColor() 92 SLHSL color = thiz->mColors[index]; in ILEDArray_GetColor() local 94 *pColor = color; in ILEDArray_GetColor() 114 SLHSL *color = thiz->mColors; in ILEDArray_init() local 116 for (index = 0; index < MAX_LED_COUNT; ++index, ++color) { in ILEDArray_init() 117 color->hue = 0; // red, but per specification 1.0.1 pg. 259: "Default color is undefined." in ILEDArray_init() [all …]
|
/frameworks/native/services/surfaceflinger/tests/utils/ |
D | TransactionUtils.h | 39 std::ostream& operator<<(std::ostream& os, const Color& color) { 40 os << int(color.r) << ", " << int(color.g) << ", " << int(color.b) << ", " << int(color.a); 48 const Color& color) { in fillANativeWindowBufferColor() argument 61 dst[0] = color.r; in fillANativeWindowBufferColor() 62 dst[1] = color.g; in fillANativeWindowBufferColor() 63 dst[2] = color.b; in fillANativeWindowBufferColor() 64 dst[3] = color.a; in fillANativeWindowBufferColor() 72 const Color& color) { in fillGraphicBufferColor() argument 88 dst[0] = color.r; in fillGraphicBufferColor() 89 dst[1] = color.g; in fillGraphicBufferColor() [all …]
|
D | ColorUtils.h | 54 static void DegammaColor(half3& color) { in DegammaColor() argument 55 DegammaColorSingle(color.r); in DegammaColor() 56 DegammaColorSingle(color.g); in DegammaColor() 57 DegammaColorSingle(color.b); in DegammaColor() 68 static void GammaColor(half3& color) { in GammaColor() argument 69 GammaColorSingle(color.r); in GammaColor() 70 GammaColorSingle(color.g); in GammaColor() 71 GammaColorSingle(color.b); in GammaColor() 74 static void applyMatrix(half3& color, const mat3& mat) { in applyMatrix() argument 79 ret[i] = ret[i] + color[j] * mat[j][i]; in applyMatrix() [all …]
|
/frameworks/native/services/surfaceflinger/ |
D | EffectLayer.cpp | 83 bool EffectLayer::setColor(const half3& color) { in setColor() argument 84 if (mCurrentState.color.r == color.r && mCurrentState.color.g == color.g && in setColor() 85 mCurrentState.color.b == color.b) { in setColor() 90 mCurrentState.color.r = color.r; in setColor() 91 mCurrentState.color.g = color.g; in setColor() 92 mCurrentState.color.b = color.b; in setColor() 114 compositionState->color = getColor(); in preparePerFrameCompositionState() 149 return mDrawingState.color.r >= 0.0_hf && mDrawingState.color.g >= 0.0_hf && in fillsColor() 150 mDrawingState.color.b >= 0.0_hf; in fillsColor()
|
D | RefreshRateOverlay.cpp | 32 void RefreshRateOverlay::SevenSegmentDrawer::drawRect(const Rect& r, const half4& color, in drawRect() argument 46 iter[0] = uint8_t(color.r * 255); in drawRect() 47 iter[1] = uint8_t(color.g * 255); in drawRect() 48 iter[2] = uint8_t(color.b * 255); in drawRect() 49 iter[3] = uint8_t(color.a * 255); in drawRect() 55 const half4& color, in drawSegment() argument 80 drawRect(rect, color, buffer, pixels); in drawSegment() 83 void RefreshRateOverlay::SevenSegmentDrawer::drawDigit(int digit, int left, const half4& color, in drawDigit() argument 90 drawSegment(Segment::Upper, left, color, buffer, pixels); in drawDigit() 92 drawSegment(Segment::UpperLeft, left, color, buffer, pixels); in drawDigit() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ContrastColorUtil.java | 283 private int processColor(int color) { in processColor() argument 284 return Color.argb(Color.alpha(color), in processColor() 285 255 - Color.red(color), in processColor() 286 255 - Color.green(color), in processColor() 287 255 - Color.blue(color)); in processColor() 300 public static int findContrastColor(int color, int other, boolean findFg, double minRatio) { in findContrastColor() argument 301 int fg = findFg ? color : other; in findContrastColor() 302 int bg = findFg ? other : color; in findContrastColor() 304 return color; in findContrastColor() 336 public static int findAlphaToMeetContrast(int color, int backgroundColor, double minRatio) { in findAlphaToMeetContrast() argument [all …]
|
D | UserIcons.java | 34 R.color.user_icon_1, 35 R.color.user_icon_2, 36 R.color.user_icon_3, 37 R.color.user_icon_4, 38 R.color.user_icon_5, 39 R.color.user_icon_6, 40 R.color.user_icon_7, 41 R.color.user_icon_8 70 int colorResId = light ? R.color.user_icon_default_white : R.color.user_icon_default_gray; in getDefaultUserIcon()
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | ColorStateListTest.java | 40 mFailureColor = mResources.getColor(R.color.failColor); in setUp() 45 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testStateIsInList() 47 int focusColor = colorStateList.getColorForState(focusedState, R.color.failColor); in testStateIsInList() 48 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testStateIsInList() 53 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testEmptyState() 56 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testEmptyState() 61 int defaultColor = mResources.getColor(R.color.color1); in testGetColor() 62 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testGetColor() 67 int defaultColor = mResources.getColor(R.color.color_no_default); in testGetColorWhenListHasNoDefault() 68 assertEquals(mResources.getColor(R.color.testcolor1), defaultColor); in testGetColorWhenListHasNoDefault()
|
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/ |
D | BitmapInfo.java | 29 public final int color; field in BitmapInfo 31 public BitmapInfo(Bitmap icon, int color) { in BitmapInfo() argument 33 this.color = color; in BitmapInfo() 51 public static BitmapInfo of(@NonNull Bitmap bitmap, int color) { in of() argument 52 return new BitmapInfo(bitmap, color); in of() 63 default BitmapInfo getExtendedInfo(Bitmap bitmap, int color, BaseIconFactory iconFactory) { in getExtendedInfo() argument 64 return BitmapInfo.of(bitmap, color); in getExtendedInfo()
|
/frameworks/base/startop/apps/ColorChanging/app/src/main/java/com/android/startop/colorchanging/ |
D | MainActivity.java | 33 view.setBackgroundResource(R.color.gray); in onCreate() 39 view.setBackgroundResource(R.color.red); in goRed() 45 view.setBackgroundResource(R.color.orange); in goOrange() 51 view.setBackgroundResource(R.color.yellow); in goYellow() 57 view.setBackgroundResource(R.color.green); in goGreen() 63 view.setBackgroundResource(R.color.blue); in goBlue() 69 view.setBackgroundResource(R.color.indigo); in goIndigo() 75 view.setBackgroundResource(R.color.violet); in goViolet() 81 view.setBackgroundResource(R.color.cyan); in goCyan() 87 view.setBackgroundResource(R.color.black); in goBlack()
|
/frameworks/base/core/java/android/widget/ |
D | CalendarView.java | 170 public void setSelectedWeekBackgroundColor(@ColorInt int color) { in setSelectedWeekBackgroundColor() argument 171 mDelegate.setSelectedWeekBackgroundColor(color); in setSelectedWeekBackgroundColor() 198 public void setFocusedMonthDateColor(@ColorInt int color) { in setFocusedMonthDateColor() argument 199 mDelegate.setFocusedMonthDateColor(color); in setFocusedMonthDateColor() 226 public void setUnfocusedMonthDateColor(@ColorInt int color) { in setUnfocusedMonthDateColor() argument 227 mDelegate.setUnfocusedMonthDateColor(color); in setUnfocusedMonthDateColor() 254 public void setWeekNumberColor(@ColorInt int color) { in setWeekNumberColor() argument 255 mDelegate.setWeekNumberColor(color); in setWeekNumberColor() 282 public void setWeekSeparatorLineColor(@ColorInt int color) { in setWeekSeparatorLineColor() argument 283 mDelegate.setWeekSeparatorLineColor(color); in setWeekSeparatorLineColor() [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/template/ |
D | ProgressBarMixin.java | 34 @Nullable private ColorStateList color; field in ProgressBarMixin 82 setColor(color); in getProgressBar() 100 public void setColor(@Nullable ColorStateList color) { in setColor() argument 101 this.color = color; in setColor() 105 bar.setIndeterminateTintList(color); in setColor() 106 if (Build.VERSION.SDK_INT >= VERSION_CODES.M || color != null) { in setColor() 113 bar.setProgressBackgroundTintList(color); in setColor() 125 return color; in getColor()
|
/frameworks/base/libs/hwui/jni/ |
D | android_graphics_ColorSpace.cpp | 53 SkColor4f GraphicsJNI::convertColorLong(jlong color) { in convertColorLong() argument 54 if ((color & 0x3f) == 0) { in convertColorLong() 56 uint8_t a = color >> 56 & 0xff; in convertColorLong() 57 uint8_t r = color >> 48 & 0xff; in convertColorLong() 58 uint8_t g = color >> 40 & 0xff; in convertColorLong() 59 uint8_t b = color >> 32 & 0xff; in convertColorLong() 65 float r = halfToFloat((uint16_t)(color >> 48 & 0xffff)); in convertColorLong() 66 float g = halfToFloat((uint16_t)(color >> 32 & 0xffff)); in convertColorLong() 67 float b = halfToFloat((uint16_t)(color >> 16 & 0xffff)); in convertColorLong() 68 float a = (color >> 6 & 0x3ff) / 1023.0f; in convertColorLong()
|
/frameworks/base/docs/html/sdk/support_api_diff/25.0.0/ |
D | stylesheet-jdiff.css | 6 .diffspechead {background-color:#eee;} 8 … {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;padding-left:1px;p… 9 td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;tex… 10 td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;tex… 11 td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-ali… 12 td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:4…
|
/frameworks/base/docs/html/sdk/support_api_diff/25.1.0/ |
D | stylesheet-jdiff.css | 6 .diffspechead {background-color:#eee;} 8 … {background-color:eee;border:0px;font-size:90%;font-weight:normal;padding:0px;padding-left:1px;p… 9 td.diffvalueold {color:orange;background-color:white;border:0px;font-size:80%;font-style:normal;tex… 10 td.diffvaluenew {color:green;background-color:white;border:0px;font-size:80%;font-weight:normal;tex… 11 td.diffvalue {color:444;background-color:white;border:0px;font-size:80%;font-weight:normal;text-ali… 12 td.diffspec {background-color:white;border:0px;font-size:80%;font-weight:normal;padding:1px;color:4…
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/ |
D | BrushPropertyDrawable.kt | 27 it.color = Color.BLACK in <lambda>() 31 it.color = Color.RED in <lambda>() 42 fun setFrameColor(color: Int) { in setFrameColor() 43 framePaint.color = color in setFrameColor() 47 fun setWellColor(color: Int) { in setWellColor() 48 wellPaint.color = color in setWellColor()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/ |
D | TileColorPickerTest.java | 45 getColorStateList(R.color.tint_color_selector, mContext.getTheme()); in setUp() 50 final int color = mTileColorPicker.getColor(Tile.STATE_UNAVAILABLE); in testGetColor_StateUnavailable_ReturnUnavailableColor() local 54 assertEquals(expectedColor, color); in testGetColor_StateUnavailable_ReturnUnavailableColor() 59 final int color = mTileColorPicker.getColor(Tile.STATE_INACTIVE); in testGetColor_StateInactive_ReturnInactiveColor() local 63 assertEquals(expectedColor, color); in testGetColor_StateInactive_ReturnInactiveColor() 68 final int color = mTileColorPicker.getColor(Tile.STATE_ACTIVE); in testGetColor_StateActive_ReturnActiveColor() local 72 assertEquals(expectedColor, color); in testGetColor_StateActive_ReturnActiveColor()
|
/frameworks/native/opengl/tests/hwc/ |
D | hwcTestLib.cpp | 307 ColorFract color; in hwcTestParseColor() local 317 if (!in || ((chStart != '<') && (chStart != '['))) { return color; } in hwcTestParseColor() 321 if (!in) { return color; } in hwcTestParseColor() 322 if ((c1 < 0.0) || (c1 > 1.0)) { return color; } in hwcTestParseColor() 324 if (!in || (ch != ',')) { return color; } in hwcTestParseColor() 328 if (!in) { return color; } in hwcTestParseColor() 329 if ((c2 < 0.0) || (c2 > 1.0)) { return color; } in hwcTestParseColor() 331 if (!in || (ch != ',')) { return color; } in hwcTestParseColor() 335 if (!in) { return color; } in hwcTestParseColor() 336 if ((c3 < 0.0) || (c3 > 1.0)) { return color; } in hwcTestParseColor() [all …]
|
/frameworks/native/libs/renderengine/gl/ |
D | GLSkiaShadowPort.cpp | 233 vec4 color = args.fColor; in fillInCircleVerts() local 250 shadowColor[vertexCount] = color; in fillInCircleVerts() 255 shadowColor[vertexCount] = color; in fillInCircleVerts() 260 shadowColor[vertexCount] = color; in fillInCircleVerts() 265 shadowColor[vertexCount] = color; in fillInCircleVerts() 270 shadowColor[vertexCount] = color; in fillInCircleVerts() 275 shadowColor[vertexCount] = color; in fillInCircleVerts() 280 shadowColor[vertexCount] = color; in fillInCircleVerts() 285 shadowColor[vertexCount] = color; in fillInCircleVerts() 298 shadowColor[vertexCount] = color; in fillInCircleVerts() [all …]
|
/frameworks/opt/car/setupwizard/library/main/tests/robotests/src/com/android/car/setupwizardlib/partner/ |
D | PartnerConfigHelperTest.java | 93 ColorStateList grayColorStateList = ColorStateList.valueOf(android.R.color.darker_gray); in getColor_shouldReturnExpectedColor() 98 int color = helper.getColor(application, TEST_COLOR_RESOURCE_NAME); in getColor_shouldReturnExpectedColor() local 99 assertThat(color).isEqualTo(android.R.color.darker_gray); in getColor_shouldReturnExpectedColor() 102 .isEqualTo(android.R.color.darker_gray); in getColor_shouldReturnExpectedColor() 108 ColorStateList grayColorStateList = ColorStateList.valueOf(android.R.color.darker_gray); in getColor_whenCacheHasColorStateList_shouldReturnExpectedColor() 117 int color = helper.getColor(application, TEST_COLOR_RESOURCE_NAME); in getColor_whenCacheHasColorStateList_shouldReturnExpectedColor() local 118 assertThat(color).isEqualTo(android.R.color.darker_gray); in getColor_whenCacheHasColorStateList_shouldReturnExpectedColor() 121 .isEqualTo(android.R.color.darker_gray); in getColor_whenCacheHasColorStateList_shouldReturnExpectedColor() 127 ColorStateList grayColorStateList = ColorStateList.valueOf(android.R.color.darker_gray); in getColorStateList_shouldReturnExpectedColorStateList() 146 ColorStateList grayColorStateList = ColorStateList.valueOf(android.R.color.darker_gray); in getColorStateList_whenCacheHasColorValue_shouldReturnExpectedColorStateList() [all …]
|
/frameworks/native/cmds/surfacereplayer/replayer/ |
D | BufferQueueScheduler.cpp | 26 const sp<SurfaceControl>& surfaceControl, const HSV& color, int id) in BufferQueueScheduler() argument 27 : mSurfaceControl(surfaceControl), mColor(color), mSurfaceId(id), mContinueScheduling(true) {} in BufferQueueScheduler() 68 const sp<SurfaceControl>& surfaceControl, const HSV& color) { in setSurfaceControl() argument 71 mColor = color; in setSurfaceControl() 91 auto color = mColor.getRGB(); in fillSurface() local 97 pixel[0] = color.r; in fillSurface() 98 pixel[1] = color.g; in fillSurface() 99 pixel[2] = color.b; in fillSurface()
|