egl/wayland: unify dri2_wl_create_surface implementations
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 28 Nov 2016 18:25:19 +0000 (18:25 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 18 Jan 2017 16:01:14 +0000 (16:01 +0000)
commitcb5e799448c959fa9f0d7ea76999ac6f8c0ad88e
treeafee42053f429f5db4b7ea54f4dcbdf387e4cd76
parentbfd63143502ff03ceae903f959a6f41666b849bc
egl/wayland: unify dri2_wl_create_surface implementations

Rather than having two almost identical codepaths (one for HW/wl_drm and
another for SW/wl_shm), just factorise and reuse in both places.

v2: Rebase
v3: Rebase

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
src/egl/drivers/dri2/platform_wayland.c