From 0d955c185b2b43d3c1fa07fa53716301b9ed4a32 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 25 Jan 2017 09:19:41 -0700 Subject: [PATCH] Add enums for 10bit color formats To improve wide-color behavior it's useful to have more bits per color component. This defines 10:10:10:2 and 10:10:10:X for that use. This can be used for any color space / dataspace that is compatible with unsigned integer components, e.g. Display-P3, BT2020, etc. Test: TBD Change-Id: I69647f6bb2d5b0666a0819b10ee42705361e267d --- graphics/common/1.0/types.hal | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/graphics/common/1.0/types.hal b/graphics/common/1.0/types.hal index 6fddfaf0bc..da36a60dad 100644 --- a/graphics/common/1.0/types.hal +++ b/graphics/common/1.0/types.hal @@ -37,6 +37,16 @@ enum PixelFormat : int32_t { RGB_565 = 4, BGRA_8888 = 5, + /* + * The following formats use 10bit integers for R, G, and B and + * 2 bits for alpha. This is used to improve color precision on + * wide-color devices, e.g. Display-P3 or scRGB. + * + * When used with ANativeWindow, the dataSpace field describes the color + * space of the buffer. + */ + RGBA_1010102 = 0x2B, + /* * The following formats use a 16bit float per color component. *