summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2014-07-09 13:58:44 -0700
committerGreg Hackmann <ghackmann@google.com>2014-07-23 20:59:44 +0000
commit8931ce18e546fc80d6249f6d772865a73007e1ee (patch)
treeb1c50d14e0d40a5042b305815ab13361188ba51e
parentbe7f044b64c9448324fa791294135468e12e5a9b (diff)
downloadhardware_libhardware-8931ce18e546fc80d6249f6d772865a73007e1ee.zip
hardware_libhardware-8931ce18e546fc80d6249f6d772865a73007e1ee.tar.gz
hardware_libhardware-8931ce18e546fc80d6249f6d772865a73007e1ee.tar.bz2
gralloc: add GRALLOC_USAGE_CURSOR flag
On many devices, hardware cursors have stricter layout constraints than other overlays. GRALLOC_USAGE_CURSOR indicates a buffer may be used as a cursor; byte order and padding should be chosen accordingly. GRALLOC_USAGE_CURSOR must not cause allocation failure. If the requested properties (dimensions, format, other usage flags, etc.) aren't compatible with the device's cursor hardware, the implementation must allocate the buffer anyway, acting as if GRALLOC_USAGE_CURSOR were not specified. Change-Id: I7d66e8d7c953421d996c5def3257d408f91962f4 Signed-off-by: Greg Hackmann <ghackmann@google.com>
-rw-r--r--include/hardware/gralloc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h
index e7d0103..91e2f69 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -124,6 +124,9 @@ enum {
*/
GRALLOC_USAGE_PROTECTED = 0x00004000,
+ /* buffer may be used as a cursor */
+ GRALLOC_USAGE_CURSOR = 0x00008000,
+
/* implementation-specific private usage flags */
GRALLOC_USAGE_PRIVATE_0 = 0x10000000,
GRALLOC_USAGE_PRIVATE_1 = 0x20000000,