hwc: Add support for external-only layers
Add support for different types of external-only layers
EXTERNAL_ONLY: General purpose
EXTERNAL_BLOCK: Blocks the display of other ext-only layers
EXTERNAL_CC: Used for closed captions with videos.
Change-Id: I9cc7b9a1dbf1085194725474d6a4d1094e27a0c8
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
diff --git a/libgralloc/gralloc_priv.h b/libgralloc/gralloc_priv.h
index 8f411dc..fa1fe6e 100644
--- a/libgralloc/gralloc_priv.h
+++ b/libgralloc/gralloc_priv.h
@@ -60,20 +60,22 @@
GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED = 0X04000000,
/* Buffer content should be displayed on an external display only */
- GRALLOC_USAGE_EXTERNAL_ONLY = 0x08000000,
+ GRALLOC_USAGE_PRIVATE_EXTERNAL_ONLY = 0x08000000,
/* Only this buffer content should be displayed on external, even if
* other EXTERNAL_ONLY buffers are available. Used during suspend.
*/
- GRALLOC_USAGE_EXTERNAL_BLOCK = 0x00100000,
+ GRALLOC_USAGE_PRIVATE_EXTERNAL_BLOCK = 0x00100000,
+
+ /* Close Caption displayed on an external display only */
+ GRALLOC_USAGE_PRIVATE_EXTERNAL_CC = 0x00200000,
/* Use this flag to request content protected buffers. Please note
* that this flag is different from the GRALLOC_USAGE_PROTECTED flag
* which can be used for buffers that are not secured for DRM
* but still need to be protected from screen captures
- * 0x00040000 is reserved and these values are subject to change.
*/
- GRALLOC_USAGE_PRIVATE_CP_BUFFER = 0x00200000,
+ GRALLOC_USAGE_PRIVATE_CP_BUFFER = 0x00400000,
};
enum {
@@ -153,6 +155,8 @@
PRIV_FLAGS_EXTERNAL_ONLY = 0x00002000,
// Display only this buffer on external
PRIV_FLAGS_EXTERNAL_BLOCK = 0x00004000,
+ // Display this buffer on external as close caption
+ PRIV_FLAGS_EXTERNAL_CC = 0x00008000,
};
// file-descriptors