egl: refactor dri2_create_screen() into three separate functions
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 11 May 2017 15:20:04 +0000 (16:20 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 29 May 2017 15:50:06 +0000 (16:50 +0100)
commit2c341f2bda49b1b53ffddc62eb2483cdf2803cc1
tree23670ac2d1153bc56650ea3e3fb28e15f190e289
parentee3b32696f347b457ac64dbbcaac9c582529be94
egl: refactor dri2_create_screen() into three separate functions

Split the create_screen into:
 - create screen
 - setup/bind extensions
 - setup screen

This will allow us to reuse the latter two on egl/drm. Said platform
does create its own screen and attempts to reinvent the later two
functions itself.

Since the GBM ones tend to get out of sync quite often, and there is no
distinct reason why it does so we'll drop them with latter commits.

v2: disp -> dpy for the Android platform.
v3: use correct goto label (Rob)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Rob Herring <robh@kernel.org>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_android.c
src/egl/drivers/dri2/platform_surfaceless.c
src/egl/drivers/dri2/platform_wayland.c
src/egl/drivers/dri2/platform_x11.c