sdm/hwc/gralloc: Move fb_id lifecycle to DAL
--Move fb_id creation/deletion from gralloc to DAL and make it per
cycle
--Make Gralloc/HWC/SDM structures independent of libdrmutils
and fb_id / gemhandles
--Pass BufferAllocator pointer to Display* and HWDevice*
--Add new GetBufferLayout API to BufferAllocator that can be called
by DAL before creating fb_id
Change-Id: I102f432cccee912ad4bcce622764938fa3d36ed3
CRs-fixed: 1114808
diff --git a/libgralloc/gr.h b/libgralloc/gr.h
index edeca3f..dad4a38 100644
--- a/libgralloc/gr.h
+++ b/libgralloc/gr.h
@@ -71,13 +71,9 @@
// Function to check if the format is an RGB format
bool isUncompressedRgbFormat(int format);
-#ifdef COMPILE_DRM
-int getPlaneStrideOffset(private_handle_t *hnd, uint32_t *stride,
- uint32_t *offset, uint32_t *num_planes);
-
-void getDRMFormat(int hal_format, int flags, uint32_t *drm_format,
- uint64_t *drm_format_modifier);
-#endif
+// Returns number of planes, stride and offset of each plane for a given w,h,f
+int getBufferLayout(private_handle_t *hnd, uint32_t stride[4],
+ uint32_t offset[4], uint32_t *num_planes);
/*****************************************************************************/
class Locker {