wayland-egl: rework and simplify wl_egl_window initialization
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 28 Sep 2017 17:38:13 +0000 (18:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 2 Oct 2017 15:29:38 +0000 (16:29 +0100)
commit677edff5cfdefdd1433beff4787a7d7987e07bd3
tree21e5f0ac76feb7fd1a9235fe83a392e725b4d3bb
parentebc51ff932083ab1bda58a4b66b3e35f3b593fa0
wayland-egl: rework and simplify wl_egl_window initialization

Use calloc instead of malloc + explicitly zeroing the different fields.
We need special handling for the version field which is of type
const intptr_t.

As we're here document why keeping the constness is a good idea.

The wl_egl_window_resize() call is replaced with an explicit set of the
width/height.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Miguel A. Vico <mvicomoya@nvidia.com>
src/egl/wayland/wayland-egl/wayland-egl.c