diff options
| author | 2017-01-18 16:34:42 -0800 | |
|---|---|---|
| committer | 2017-01-19 18:44:00 -0800 | |
| commit | c9ba55902123be5abcf2dcda5af9995be0b8d3d8 (patch) | |
| tree | 953bf264c1f748816ad8ebc4898f580d163ce959 /libs/androidfw/include | |
| parent | a2b1774d758b58fc5977f631eff76fa21d303906 (diff) | |
Add wide color gamut and HDR resource qualifiers
Bug: 32984164
Test: Config_test, AaptConfig_test and aapt2_tests
Change-Id: Ie9c82bfe2d36b1d6180ee223250ab5bb2ce90dd4
Diffstat (limited to 'libs/androidfw/include')
| -rw-r--r-- | libs/androidfw/include/androidfw/ResourceTypes.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/androidfw/include/androidfw/ResourceTypes.h b/libs/androidfw/include/androidfw/ResourceTypes.h index c118b57510f9..1e4aee9d18e7 100644 --- a/libs/androidfw/include/androidfw/ResourceTypes.h +++ b/libs/androidfw/include/androidfw/ResourceTypes.h @@ -1146,11 +1146,26 @@ struct ResTable_config SCREENROUND_YES = ACONFIGURATION_SCREENROUND_YES, }; + enum { + // colorimetry 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. + 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, + }; + // An extension of screenConfig. union { struct { uint8_t screenLayout2; // Contains round/notround qualifier. - uint8_t screenConfigPad1; // Reserved padding. + uint8_t colorimetry; // Wide-gamut, HDR, etc. uint16_t screenConfigPad2; // Reserved padding. }; uint32_t screenConfig2; @@ -1193,6 +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, }; // Compare two configuration, returning CONFIG_* flags set for each value |