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@collabora.com>
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);