egl/android: droid_open_device_drm_gralloc --> droid_open_device
authorGurchetan Singh <gurchetansingh@chromium.org>
Mon, 25 Mar 2019 23:50:46 +0000 (16:50 -0700)
committerGurchetan Singh <gurchetansingh@chromium.org>
Wed, 27 Mar 2019 17:26:21 +0000 (17:26 +0000)
Makes things easier to follow.

Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/egl/drivers/dri2/platform_android.c

index b9ba29f69794d96d834cdfc394e378a975636b1d..423d685bfa89c4909aa0ba969a43375a9b730907 100644 (file)
@@ -1434,7 +1434,7 @@ droid_probe_device(_EGLDisplay *disp)
 
 #ifdef HAVE_DRM_GRALLOC
 static EGLBoolean
-droid_open_device_drm_gralloc(_EGLDisplay *disp)
+droid_open_device(_EGLDisplay *disp)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
    int fd = -1, err = -EINVAL;
@@ -1454,8 +1454,7 @@ droid_open_device_drm_gralloc(_EGLDisplay *disp)
 
    return droid_probe_device(disp);
 }
-#endif /* HAVE_DRM_GRALLOC */
-
+#else
 static EGLBoolean
 droid_open_device(_EGLDisplay *disp)
 {
@@ -1526,6 +1525,8 @@ droid_open_device(_EGLDisplay *disp)
 #undef MAX_DRM_DEVICES
 }
 
+#endif
+
 EGLBoolean
 dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp)
 {
@@ -1552,11 +1553,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp)
 
    disp->DriverData = (void *) dri2_dpy;
 
-#ifdef HAVE_DRM_GRALLOC
-   if (!droid_open_device_drm_gralloc(disp)) {
-#else
    if (!droid_open_device(disp)) {
-#endif
       err = "DRI2: failed to open device";
       goto cleanup;
    }