Gralloc: Use adreno APIs for buffer size calculations
1) Add support to use adreno APIs for non video layers'
buffer size calculations.
2) Add graphics metadata field to MetaData_t structure.
3) Add bindings for newly introduced formats in
GetGpuPixelFormat.
4) Add support to retrieve the graphics metadata in
Perform API.
5) Modify BUFFER_TYPE determination logic
Change-Id: I7674209b42d7cd39bc8de39e3a10582bb216e6cf
CRs-Fixed: 2226672
diff --git a/gralloc/gr_utils.h b/gralloc/gr_utils.h
index 783453f..fa62871 100644
--- a/gralloc/gr_utils.h
+++ b/gralloc/gr_utils.h
@@ -32,6 +32,7 @@
#include <android/hardware/graphics/common/1.1/types.h>
#include "gralloc_priv.h"
+#include "qdMetaData.h"
#define SZ_2M 0x200000
#define SZ_1M 0x100000
@@ -67,7 +68,7 @@
return (Type1)((x + (Type1)align - 1) & ~((Type1)align - 1));
}
-bool IsYuvFormat(const private_handle_t *hnd);
+bool IsYuvFormat(int format);
bool IsCompressedRGBFormat(int format);
bool IsUncompressedRGBFormat(int format);
uint32_t GetBppForUncompressedRGB(int format);
@@ -102,6 +103,10 @@
uint32_t *num_planes);
uint32_t GetDataAlignment(int format, uint64_t usage);
+void GetGpuResourceSizeAndDimensions(const BufferInfo &info, unsigned int *size,
+ unsigned int *alignedw, unsigned int *alignedh,
+ GraphicsMetadata *graphics_metadata);
+bool GetAdrenoSizeAPIStatus();
} // namespace gralloc
#endif // __GR_UTILS_H__