Mesa (master): egl/wayland: simplify dri2_initialize_wayland()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 1 18:46:31 UTC 2020
Module: Mesa
Branch: master
Commit: bd385c424bdda6ffe38ea9100c77e43337dd34b8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd385c424bdda6ffe38ea9100c77e43337dd34b8
Author: Eric Engestrom <eric at engestrom.ch>
Date: Mon Aug 17 20:32:12 2020 +0200
egl/wayland: simplify dri2_initialize_wayland()
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>
---
src/egl/drivers/dri2/platform_wayland.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index a443ee0e3f9..cd43fb26d5e 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -2098,16 +2098,10 @@ dri2_initialize_wayland_swrast(_EGLDisplay *disp)
EGLBoolean
dri2_initialize_wayland(_EGLDisplay *disp)
{
- EGLBoolean initialized = EGL_FALSE;
-
- if (!disp->Options.ForceSoftware)
- initialized = dri2_initialize_wayland_drm(disp);
-
- if (!initialized)
- initialized = dri2_initialize_wayland_swrast(disp);
-
- return initialized;
-
+ if (disp->Options.ForceSoftware)
+ return dri2_initialize_wayland_swrast(disp);
+ else
+ return dri2_initialize_wayland_drm(disp);
}
void
More information about the mesa-commit
mailing list