Currently a gralloc internal structure is exposed to Mesa,
Use a query function instead to maintain ABI compatibility.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
#include <radeon_drm.h>
#include "egl_dri2.h"
+#include "gralloc_drm.h"
static int
get_format_bpp(int native)
static int
get_native_buffer_name(struct ANativeWindowBuffer *buf)
{
- struct gralloc_drm_handle_t *handle;
-
- /* check that the buffer is allocated by drm_gralloc and cast */
- handle = gralloc_drm_handle(buf->handle);
-
- return (handle) ? handle->name : 0;
+ return gralloc_drm_get_gem_handle(buf->handle);
}
static EGLBoolean
libdl \
libhardware \
liblog \
- libcutils
+ libcutils \
+ libgralloc_drm \
+
# add libdrm if there are hardware drivers
ifneq ($(MESA_GPU_DRIVERS),swrast)
#ifndef ANDROID_BACKEND_NO_DRM
-#include <gralloc_drm_handle.h>
+#include <gralloc_drm.h>
static int
get_handle_name(buffer_handle_t handle)
{
- struct gralloc_drm_handle_t *dh;
-
- /* check that the buffer is allocated by drm_gralloc and cast */
- dh = gralloc_drm_handle(handle);
-
- return (dh) ? dh->name : 0;
+ return gralloc_drm_get_gem_handle(handle);
}
-
#else
static int