diff options
Diffstat (limited to 'cros_gralloc')
-rw-r--r-- | cros_gralloc/cros_gralloc_helpers.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cros_gralloc/cros_gralloc_helpers.cc b/cros_gralloc/cros_gralloc_helpers.cc index 86b4c8c..5f650fc 100644 --- a/cros_gralloc/cros_gralloc_helpers.cc +++ b/cros_gralloc/cros_gralloc_helpers.cc @@ -15,6 +15,9 @@ /* Define to match AIDL BufferUsage::GPU_DATA_BUFFER. */ #define BUFFER_USAGE_GPU_DATA_BUFFER (1 << 24) +/* Define to match AIDL BufferUsage::GPU_MIPMAP_COMPLETE. */ +#define BUFFER_USAGE_GPU_MIPMAP_COMPLETE (1 << 26) + uint32_t cros_gralloc_convert_format(int format) { /* @@ -71,6 +74,9 @@ uint64_t cros_gralloc_convert_usage(uint64_t usage) { uint64_t use_flags = BO_USE_NONE; + if (usage & BUFFER_USAGE_GPU_MIPMAP_COMPLETE) + return BO_USE_NONE; + if (usage & GRALLOC_USAGE_CURSOR) use_flags |= BO_USE_NONE; if ((usage & GRALLOC_USAGE_SW_READ_MASK) == GRALLOC_USAGE_SW_READ_RARELY) |