egl/android: simplify dri2_initialize_android()
authorEric Engestrom <eric@engestrom.ch>
Mon, 17 Aug 2020 18:30:47 +0000 (20:30 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Sep 2020 18:31:51 +0000 (18:31 +0000)
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>

src/egl/drivers/dri2/platform_android.c

index 9d3598726d4276b02762a1d76cd300b02ed4e7bf..3f11147bf09fe9f0ea5ac24cb0e59c21c80c666e 100644 (file)
@@ -1601,10 +1601,7 @@ dri2_initialize_android(_EGLDisplay *disp)
    }
 
    disp->DriverData = (void *) dri2_dpy;
-   if (!disp->Options.ForceSoftware)
-      device_opened = droid_open_device(disp, false);
-   if (!device_opened)
-      device_opened = droid_open_device(disp, true);
+   device_opened = droid_open_device(disp, disp->Options.ForceSoftware);
 
    if (!device_opened) {
       err = "DRI2: failed to open device";