OSDN Git Service

egl/android: fix missing gralloc_drm_get_gem_handle dependency
authorRob Herring <robh@kernel.org>
Mon, 25 Jan 2016 17:54:01 +0000 (11:54 -0600)
committerMauro Rossi <mauro.rossi@inwind.it>
Fri, 15 Jul 2016 22:04:22 +0000 (00:04 +0200)
gralloc_drm_get_gem_handle has been removed from AOSP drm_gralloc.
Remove the dependency on it and just access the struct
gralloc_drm_handle_t directly. Maybe there's a better way than accessing
the gralloc private data.

Signed-off-by: Rob Herring <robh@kernel.org>
src/egl/drivers/dri2/platform_android.c

index e563fe2..3ccf916 100644 (file)
@@ -39,6 +39,7 @@
 #include "egl_dri2.h"
 #include "egl_dri2_fallbacks.h"
 #include "gralloc_drm.h"
+#include "gralloc_drm_handle.h"
 
 static int
 get_format_bpp(int native)
@@ -107,7 +108,8 @@ get_native_buffer_fd(struct ANativeWindowBuffer *buf)
 static int
 get_native_buffer_name(struct ANativeWindowBuffer *buf)
 {
-   return gralloc_drm_get_gem_handle(buf->handle);
+   struct gralloc_drm_handle_t *handle = gralloc_drm_handle(buf->handle);
+   return (handle) ? handle->name : 0;
 }
 
 static EGLBoolean