From 4832745b84d6a358582f2264d22acacf25e01b07 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 23 Jan 2017 17:03:35 -0800 Subject: Add color mode to activity/window The color mode lets an application request a wide color gamut for a specific window. This will also be used in the future to request HDR. The color mode is currently either default (sRGB) or an undefined wide gamut color space chosen by the platform. These attributes could later be used to choose a specific color space if we deem this important or useful. This change also renames the various "colorimetry" attributes and constants to "color mode" for consistency. These symbols were added in O and can be safely renamed. Test: CtsColorModeTestCases Bug: 32984164 Change-Id: I4d4691dd12dbe3f3aa6a5cf893cff39aa16c739e --- libs/androidfw/include/androidfw/ResourceTypes.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libs/androidfw/include') diff --git a/libs/androidfw/include/androidfw/ResourceTypes.h b/libs/androidfw/include/androidfw/ResourceTypes.h index 1e4aee9d18e7..86ab123ff064 100644 --- a/libs/androidfw/include/androidfw/ResourceTypes.h +++ b/libs/androidfw/include/androidfw/ResourceTypes.h @@ -1147,25 +1147,25 @@ struct ResTable_config }; enum { - // colorimetry bits for wide-color gamut/narrow-color gamut. + // colorMode bits for wide-color gamut/narrow-color gamut. MASK_WIDE_COLOR_GAMUT = 0x03, WIDE_COLOR_GAMUT_ANY = ACONFIGURATION_WIDE_COLOR_GAMUT_ANY, WIDE_COLOR_GAMUT_NO = ACONFIGURATION_WIDE_COLOR_GAMUT_NO, WIDE_COLOR_GAMUT_YES = ACONFIGURATION_WIDE_COLOR_GAMUT_YES, - // colorimetry bits for HDR/LDR. + // colorMode bits for HDR/LDR. MASK_HDR = 0x0c, - SHIFT_COLORIMETRY_HDR = 2, - HDR_ANY = ACONFIGURATION_HDR_ANY << SHIFT_COLORIMETRY_HDR, - HDR_NO = ACONFIGURATION_HDR_NO << SHIFT_COLORIMETRY_HDR, - HDR_YES = ACONFIGURATION_HDR_YES << SHIFT_COLORIMETRY_HDR, + SHIFT_COLOR_MODE_HDR = 2, + HDR_ANY = ACONFIGURATION_HDR_ANY << SHIFT_COLOR_MODE_HDR, + HDR_NO = ACONFIGURATION_HDR_NO << SHIFT_COLOR_MODE_HDR, + HDR_YES = ACONFIGURATION_HDR_YES << SHIFT_COLOR_MODE_HDR, }; // An extension of screenConfig. union { struct { uint8_t screenLayout2; // Contains round/notround qualifier. - uint8_t colorimetry; // Wide-gamut, HDR, etc. + uint8_t colorMode; // Wide-gamut, HDR, etc. uint16_t screenConfigPad2; // Reserved padding. }; uint32_t screenConfig2; @@ -1208,7 +1208,7 @@ struct ResTable_config CONFIG_UI_MODE = ACONFIGURATION_UI_MODE, CONFIG_LAYOUTDIR = ACONFIGURATION_LAYOUTDIR, CONFIG_SCREEN_ROUND = ACONFIGURATION_SCREEN_ROUND, - CONFIG_COLORIMETRY = ACONFIGURATION_COLORIMETRY, + CONFIG_COLOR_MODE = ACONFIGURATION_COLOR_MODE, }; // Compare two configuration, returning CONFIG_* flags set for each value -- cgit v1.2.3-59-g8ed1b