wl_buffer_release
};
+static void
+resize_callback(struct wl_egl_window *wl_win, void *data)
+{
+ struct dri2_egl_surface *dri2_surf = data;
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
+}
+
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
*/
case EGL_WINDOW_BIT:
dri2_surf->wl_win = (struct wl_egl_window *) window;
+ dri2_surf->wl_win->private = dri2_surf;
+ dri2_surf->wl_win->resize_callback = resize_callback;
+
dri2_surf->base.Width = -1;
dri2_surf->base.Height = -1;
break;
if (dri2_surf->frame_callback)
wl_callback_destroy(dri2_surf->frame_callback);
+
+ if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
+ dri2_surf->wl_win->private = NULL;
+ dri2_surf->wl_win->resize_callback = NULL;
+ }
+
free(surf);
return EGL_TRUE;
}
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
- (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
return EGL_TRUE;
}
egl_window->height = height;
egl_window->dx = dx;
egl_window->dy = dy;
+
+ if (egl_window->resize_callback)
+ egl_window->resize_callback(egl_window, egl_window->private);
}
WL_EGL_EXPORT struct wl_egl_window *
return NULL;
egl_window->surface = surface;
+ egl_window->private = NULL;
+ egl_window->resize_callback = NULL;
wl_egl_window_resize(egl_window, width, height, 0, 0);
egl_window->attached_width = 0;
egl_window->attached_height = 0;