[Mesa-dev] [PATCH 6/7] egl/wayland: set the resize_callback if the flush extension is available
Emil Velikov
emil.l.velikov at gmail.com
Mon May 15 15:26:06 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Strictly speaking __DRI_DRI2 implies __DRI2_FLUSH. Although since we're
using the latter in the callback, we want to use the correct guard.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/drivers/dri2/platform_wayland.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 5b109adf774..2c568c3e084 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -181,13 +181,13 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
dri2_surf->base.GLColorspace);
- if (dri2_dpy->dri2) {
+ if (dri2_dpy->flush)
dri2_surf->wl_win->resize_callback = resize_callback;
+ if (dri2_dpy->dri2)
createNewDrawable = dri2_dpy->dri2->createNewDrawable;
- } else {
+ else
createNewDrawable = dri2_dpy->swrast->createNewDrawable;
- }
dri2_surf->dri_drawable = (*createNewDrawable)(dri2_dpy->dri_screen, config,
dri2_surf);
--
2.12.2
More information about the mesa-dev
mailing list