aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-06-20 15:22:39 +0100
committerEmil Velikov <[email protected]>2017-06-26 12:40:22 +0100
commitd42b09580a5270e8906dad4b923f320d1de18167 (patch)
tree9f333a6b2c2a875e6da62ba1fed1896d82440671 /src/egl/drivers/dri2
parent860919a3b237386cba5b2951ae520bf6734fd17e (diff)
egl: drop _eglInitImage() return type
Function cannot fail and always returns true. v2: Inline the one line function in the header Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c16
-rw-r--r--src/egl/drivers/dri2/platform_android.c5
-rw-r--r--src/egl/drivers/dri2/platform_drm.c5
-rw-r--r--src/egl/drivers/dri2/platform_x11.c7
-rw-r--r--src/egl/drivers/dri2/platform_x11_dri3.c5
5 files changed, 7 insertions, 31 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index c6af57fbc53..a022a5d9432 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1669,10 +1669,7 @@ dri2_create_image_from_dri(_EGLDisplay *disp, __DRIimage *dri_image)
return NULL;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- free(dri2_img);
- return NULL;
- }
+ _eglInitImage(&dri2_img->base, disp);
dri2_img->dri_image = dri_image;
@@ -1869,11 +1866,7 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx,
return EGL_NO_IMAGE_KHR;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- _eglError(EGL_BAD_ALLOC, "dri2_create_image_khr");
- free(dri2_img);
- return EGL_NO_IMAGE_KHR;
- }
+ _eglInitImage(&dri2_img->base, disp);
dri2_img->dri_image =
dri2_dpy->image->createImageFromTexture(dri2_ctx->dri_context,
@@ -2345,10 +2338,7 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
goto cleanup_img;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- err = EGL_BAD_PARAMETER;
- goto cleanup_img;
- }
+ _eglInitImage(&dri2_img->base, disp);
err = _eglParseImageAttribList(&attrs, disp, attr_list);
if (err != EGL_SUCCESS)
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index acd45dab4d7..aef8a105f86 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -843,10 +843,7 @@ droid_create_image_from_name(_EGLDisplay *disp, _EGLContext *ctx,
return NULL;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- free(dri2_img);
- return NULL;
- }
+ _eglInitImage(&dri2_img->base, disp);
dri2_img->dri_image =
dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 9b4a942b60f..c5ae49e9fdd 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -478,10 +478,7 @@ dri2_drm_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
return NULL;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- free(dri2_img);
- return NULL;
- }
+ _eglInitImage(&dri2_img->base, disp);
dri2_img->dri_image = dri2_dpy->image->dupImage(dri_bo->image, dri2_img);
if (dri2_img->dri_image == NULL) {
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 35612300768..324128d12ae 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1070,12 +1070,7 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
return EGL_NO_IMAGE_KHR;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- free(buffers_reply);
- free(geometry_reply);
- free(dri2_img);
- return EGL_NO_IMAGE_KHR;
- }
+ _eglInitImage(&dri2_img->base, disp);
stride = buffers[0].pitch / buffers[0].cpp;
dri2_img->dri_image =
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index 3148f4904e5..515be27e200 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -327,10 +327,7 @@ dri3_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
return EGL_NO_IMAGE_KHR;
}
- if (!_eglInitImage(&dri2_img->base, disp)) {
- free(dri2_img);
- return EGL_NO_IMAGE_KHR;
- }
+ _eglInitImage(&dri2_img->base, disp);
dri2_img->dri_image = loader_dri3_create_image(dri2_dpy->conn,
bp_reply,