From c9ba55902123be5abcf2dcda5af9995be0b8d3d8 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 18 Jan 2017 16:34:42 -0800 Subject: Add wide color gamut and HDR resource qualifiers Bug: 32984164 Test: Config_test, AaptConfig_test and aapt2_tests Change-Id: Ie9c82bfe2d36b1d6180ee223250ab5bb2ce90dd4 --- libs/androidfw/include/androidfw/ResourceTypes.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libs/androidfw/include') 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 -- cgit v1.2.3-59-g8ed1b