aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2013-01-24 09:56:47 +0200
committerChad Versace <[email protected]>2013-01-28 12:49:41 -0800
commit407029591c24edfd75970e8709f68b8e800ff50a (patch)
tree8dddb83d879e5b4db83d95ff2efd14f4582fb5c9 /src/egl
parent8e4bb4bc0913ceac3b8e2953d4172367cd85c20e (diff)
android: use gralloc_drm_get_gem_handle api
Currently a gralloc internal structure is exposed to Mesa, Use a query function instead to maintain ABI compatibility. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_android.c8
-rw-r--r--src/egl/main/Android.mk4
2 files changed, 5 insertions, 7 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 7ede48de69c..3432f18b047 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -41,6 +41,7 @@
#include <radeon_drm.h>
#include "egl_dri2.h"
+#include "gralloc_drm.h"
static int
get_format_bpp(int native)
@@ -72,12 +73,7 @@ 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
diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk
index 97e4860211a..3751ecfe41b 100644
--- a/src/egl/main/Android.mk
+++ b/src/egl/main/Android.mk
@@ -65,7 +65,9 @@ LOCAL_SHARED_LIBRARIES := \
libdl \
libhardware \
liblog \
- libcutils
+ libcutils \
+ libgralloc_drm \
+
# add libdrm if there are hardware drivers
ifneq ($(MESA_GPU_DRIVERS),swrast)