egl_dri2: Add a function to let platform code return dri drawable from _EGLSurface
authorBoyan Ding <boyan.j.ding@gmail.com>
Tue, 21 Jul 2015 15:43:59 +0000 (23:43 +0800)
committerMartin Peres <martin.peres@linux.intel.com>
Tue, 17 Nov 2015 15:26:20 +0000 (17:26 +0200)
commita25df5457121d40fef86929d4c10d8058a4d5c72
tree1b1afcc5eb150ff8e854469c9a9244e5c7f5c988
parentfdacbc439edc1d26865a99524d1a9efc9edb4c0d
egl_dri2: Add a function to let platform code return dri drawable from _EGLSurface

dri3 for EGL will use different struct other than dri2_egl_surface for
an EGL surface, the common code only uses __DRIdrawable from that
struct, so instead of converting _EGLSurface to dri2_egl_surface, let
the platform code return the __DRIdrawable by its own (although the
current platforms use the same function).

v2: From Martin Peres
 - convert to the new drawable interface (Kristian)

Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_android.c
src/egl/drivers/dri2/platform_drm.c
src/egl/drivers/dri2/platform_wayland.c
src/egl/drivers/dri2/platform_x11.c