[PATCH weston] gl-renderer: Don't print GL error for EGLGetDisplay()

Derek Foreman derekf at osg.samsung.com
Thu Jun 11 10:14:45 PDT 2015


EGLGetDisplay() doesn't generate a GL error, so we shouldn't print one.

I've also renamed the goto labels so it's a little clearer when to use them.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 src/gl-renderer.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index d18e124..2553b52 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -2351,18 +2351,18 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
 
 	if (gr->egl_display == EGL_NO_DISPLAY) {
 		weston_log("failed to create display\n");
-		goto err_egl;
+		goto fail;
 	}
 
 	if (!eglInitialize(gr->egl_display, &major, &minor)) {
 		weston_log("failed to initialize display\n");
-		goto err_egl;
+		goto fail_with_error;
 	}
 
 	if (egl_choose_config(gr, attribs, visual_id,
 			      n_ids, &gr->egl_config) < 0) {
 		weston_log("failed to choose EGL config\n");
-		goto err_config;
+		goto fail;
 	}
 
 	ec->renderer = &gr->base;
@@ -2371,7 +2371,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
 	ec->capabilities |= WESTON_CAP_VIEW_CLIP_MASK;
 
 	if (gl_renderer_setup_egl_extensions(ec) < 0)
-		goto err_egl;
+		goto fail_with_error;
 
 	wl_display_add_shm_format(ec->wl_display, WL_SHM_FORMAT_RGB565);
 
@@ -2379,9 +2379,9 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform,
 
 	return 0;
 
-err_egl:
+fail_with_error:
 	gl_renderer_print_egl_error_state();
-err_config:
+fail:
 	free(gr);
 	return -1;
 }
-- 
2.1.4



More information about the wayland-devel mailing list