[Mesa-dev] [PATCH v4 2/2] wayland/egl: update surface size on window resize

Daniel Stone daniel at fooishbar.org
Wed Aug 8 16:22:56 UTC 2018

Hi Juan,

On Tue, 7 Aug 2018 at 16:50, Juan A. Suarez Romero <jasuarez at igalia.com> wrote:
> According to EGL 1.5 spec, section ("Native Window Resizing"):
>   "If the native window corresponding to _surface_ has been resized
>    prior to the swap, _surface_ must be resized to match. _surface_ will
>    normally be resized by the EGL implementation at the time the native
>    window is resized. If the implementation cannot do this transparently
>    to the client, then *eglSwapBuffers* must detect the change and
>    resize surface prior to copying its pixels to the native window."
> So far, resizing a native window in Wayland/EGL was interpreted in Mesa
> as a request to resize, which is not executed until the first draw call.
> And hence, surface size is not updated until executing it. Thus,
> querying the surface size with eglQuerySurface() after a window resize
> still returns the old values.
> This commit updates the surface size values as soon as the resize is
> done, even when the real resize is done in the draw call. This makes the
> semantics that any native window resize request take effect inmediately,
> and if user calls eglQuerySurface() it will return the new resized
> values.

I'm pretty confident that these two patches do the right thing; series is:
Reviewed-by: Daniel Stone <daniels at collabora.com>

Thanks a lot for your patience & persistence!


More information about the mesa-dev mailing list