diff options
author | Jamie Gennis <jgennis@google.com> | 2012-08-22 14:44:51 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2012-08-22 14:44:51 -0700 |
commit | febe9d904fdae52172ea534393929918bf750446 (patch) | |
tree | f5780368544327122d90df5333b3d148caa99cda /include/system/graphics.h | |
parent | a8c2112be672409a81f200c110f901fda4907bde (diff) | |
download | core-febe9d904fdae52172ea534393929918bf750446.tar.gz core-febe9d904fdae52172ea534393929918bf750446.tar.bz2 core-febe9d904fdae52172ea534393929918bf750446.zip |
Add an IMPL_DEFINED pixel format.
This change adds a new HAL pixel format that indicates that the specific format
is to be chosen by the gralloc implementation.
Change-Id: I326b5ec7347a20863b42119431ef1e4d22480fec
Diffstat (limited to 'include/system/graphics.h')
-rw-r--r-- | include/system/graphics.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h index e0ad257f4..82b5fcc87 100644 --- a/include/system/graphics.h +++ b/include/system/graphics.h @@ -124,6 +124,22 @@ enum { */ HAL_PIXEL_FORMAT_BLOB = 0x21, + /* + * Android format indicating that the choice of format is entirely up to the + * device-specific Gralloc implementation. + * + * The Gralloc implementation should examine the usage bits passed in when + * allocating a buffer with this format, and it should derive the pixel + * format from those usage flags. This format will never be used with any + * of the GRALLOC_USAGE_SW_* usage flags. + * + * If a buffer of this format is to be used as an OpenGL ES texture, the + * framework will assume that sampling the texture will always return an + * alpha value of 1.0 (i.e. the buffer contains only opaque pixel values). + * + */ + HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED = 0x22, + /* Legacy formats (deprecated), used by ImageFormat.java */ HAL_PIXEL_FORMAT_YCbCr_422_SP = 0x10, // NV16 HAL_PIXEL_FORMAT_YCrCb_420_SP = 0x11, // NV21 |