diff options
author | Boyan Ding <[email protected]> | 2015-07-21 23:43:59 +0800 |
---|---|---|
committer | Martin Peres <[email protected]> | 2015-11-17 17:26:20 +0200 |
commit | a25df5457121d40fef86929d4c10d8058a4d5c72 (patch) | |
tree | 1b1afcc5eb150ff8e854469c9a9244e5c7f5c988 /src/egl/drivers/dri2/egl_dri2.h | |
parent | fdacbc439edc1d26865a99524d1a9efc9edb4c0d (diff) |
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 <[email protected]>
Signed-off-by: Martin Peres <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 0e837b3eb8b..c3c9fc0166c 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -145,6 +145,8 @@ struct dri2_egl_display_vtbl { EGLBoolean (*get_sync_values)(_EGLDisplay *display, _EGLSurface *surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc); + + __DRIdrawable *(*get_dri_drawable)(_EGLSurface *surf); }; struct dri2_egl_display @@ -327,6 +329,9 @@ dri2_load_driver_swrast(_EGLDisplay *disp); EGLBoolean dri2_create_screen(_EGLDisplay *disp); +__DRIdrawable * +dri2_surface_get_dri_drawable(_EGLSurface *surf); + __DRIimage * dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data); |