[Mesa-dev] [PATCH 11/13] egl: refactor dri2_create_screen() into three separate functions
Rob Herring
robh at kernel.org
Mon May 22 18:08:40 UTC 2017
On Thu, May 11, 2017 at 1:57 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> 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.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/egl/drivers/dri2/egl_dri2.c | 37 ++++++++++++++---------------
> src/egl/drivers/dri2/egl_dri2.h | 3 +++
> src/egl/drivers/dri2/platform_android.c | 5 ++++
> src/egl/drivers/dri2/platform_surfaceless.c | 7 ++++++
> src/egl/drivers/dri2/platform_wayland.c | 10 ++++++++
> src/egl/drivers/dri2/platform_x11.c | 15 ++++++++++++
> 6 files changed, 58 insertions(+), 19 deletions(-)
[...]
> diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
> index f1038957850..4c134e1460d 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -1148,6 +1148,11 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
> goto cleanup;
> }
>
> + if (!dri2_setup_extensions(dpy))
> + goto cleanup_screen;
There's no such goto.
> +
> + dri2_setup_screen(disp);
> +
> if (!droid_add_configs_for_visuals(drv, dpy)) {
> err = "DRI2: failed to add configs";
> goto cleanup;
More information about the mesa-dev
mailing list