Hi, On 1 June 2018 at 15:35, Brendan King <brendan.k...@imgtec.com> wrote: > IMG has a similar patch to the one you describe, but without the changes to > the resize_callback, so just this bit: > > @@ -255,6 +257,12 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, > goto cleanup_surf; > } > > + dri2_surf->base.Width = window->width; > + dri2_surf->base.Height = window->height; > + > > I don't think the resize_callback changes are necessary.
I think you're right, and this needs more rework to be consistent. wl_egl_window_get_attached_size() always returns the size of the last attached buffer (if there have been any); that is good and consistent. It seems like the desired semantic for handling EGL surface-size queries, is that the query returns the size of the buffer that will be attached at the next eglSwapBuffers. For example, if you issue wl_egl_window_resize() in between eglSwapBuffers() and the first draw call, the surface-size query should reflect this new size immediately after the function returns. However, if you issue wl_egl_window_resize() after a frame's first draw call has been made, querying the surface size should return the old size until eglSwapBuffers() has been called, since the resize call has no effect on the buffer which will actually be attached when calling SwapBuffers in that frame. Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev