Skip to content
Snippets Groups Projects
Commit 1fe7cbdf authored by Juan A. Suárez's avatar Juan A. Suárez
Browse files

wayland/egl: initialize window surface size to window size


When creating a windows surface with eglCreateWindowSurface(), the
width and height returned by eglQuerySurface(EGL_{WIDTH,HEIGHT}) is
invalid until buffers are updated (like calling glClear()).

But according to EGL 1.5 spec, section 3.5.6 ("Surface Attributes"):

  "Querying EGL_WIDTH and EGL_HEIGHT returns respectively the width and
   height, in pixels, of the surface. For a window or pixmap surface,
   these values are initially equal to the width and height of the
   native window or pixmap with respect to which the surface was
   created"

This fixes dEQP-EGL.functional.color_clears.* CTS tests

v2:
- Do not modify attached_{width,height} (Daniel)
- Do not update size on resizing window (Brendan)

CC: Daniel Stone <daniel@fooishbar.org>
CC: Brendan King <brendan.king@imgtec.com>
CC: mesa-stable@lists.freedesktop.org
Tested-by: Eric Engestrom's avatarEric Engestrom <eric@engestrom.ch>
Tested-by: default avatarChad Versace <chadversary@chromium.org>
Reviewed-by: default avatarChad Versace <chadversary@chromium.org>
Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
parent f9d0e7d3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment