diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2019-05-01 15:42:26 -0700 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2019-05-14 12:41:14 +0000 |
commit | 04ecda3b3c85b5a3a52f4fa1a3e0f88c17231408 (patch) | |
tree | e0c74a7d73426ea424399e85fd37a863516bf645 /src/egl/drivers/dri2/platform_wayland.c | |
parent | 9520e7c1e9206f94f73bb143483147e4600122ec (diff) | |
download | mesa-04ecda3b3c85b5a3a52f4fa1a3e0f88c17231408.tar.gz |
egl: store the native surface pointer in struct _egl_surface
Each platform stores this in a different place:
- platform_drm uses dri2_surf->gbm_surf->base
- platform_android uses dri2_surf->window
- platform_wayland uses dri2_surf->wl_win
- platform_x11 uses dri2_surf->drawable
- platform_x11_dri3 uses dri3_surf->loader_drawable.drawable
- haiku doesn't even store it!
We need access to the native surface since the specification asks us
to refuse creating a new surface if there's already an EGLSurface
associated with native_surface.
An alternative to this patch would be to create a new
API.GetNativeWindow callback that each platform would have to
implement. While that's something we can definitely do, I prefer
this approach.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'src/egl/drivers/dri2/platform_wayland.c')
-rw-r--r-- | src/egl/drivers/dri2/platform_wayland.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 2a2c8214169..bf4f2530feb 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -287,7 +287,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, } if (!dri2_init_surface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, - attrib_list, false)) + attrib_list, false, native_window)) goto cleanup_surf; config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT, |