summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-05-12 14:22:51 +0100
committerEmil Velikov <[email protected]>2017-05-29 16:59:46 +0100
commit429d56693d9eadf64fca20c9bf9f9415e68efd80 (patch)
tree1e47358c1b86903984d4dd09f8976cec438a092e /src/egl
parent6ef0fc400c690362b66add9c3533fae5f21d2cae (diff)
egl/wayland: set the resize_callback if the flush extension is available
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 <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index eafb9d5673f..39c36075d09 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -188,13 +188,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);