Suppose we create a wl_egl_window and an EGLSurface. Then we call
eglMakeCurrent(dpy,surf,surf,ctx) with that surface, render and swap.
Later we destroy the surface and the window, and we make current
another surface. That resulted in two invalid writes because
the surface, which is refcounted, get
eglSwapBuffers() should result in a call to wl_display_flush since it
may be called by a rendering thread, and it cannot rely on the main
loop to call it. The main loop may indeed be stuck on a
wl_display_dispatch() call which blocks until there are events, and
if the redraw is triggered by an appl