From 3956ffd5e8738306c28a74e341b15e4d82ddc07a Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 26 Mar 2020 19:04:38 -0300 Subject: [PATCH] cogl/driver: Remove GError from context_init It is not used by anyone, let's just remove it. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1152 --- cogl/cogl/cogl-context.c | 2 +- cogl/cogl/cogl-driver.h | 2 +- cogl/cogl/driver/gl/cogl-util-gl-private.h | 3 +-- cogl/cogl/driver/gl/cogl-util-gl.c | 3 +-- cogl/cogl/driver/gl/gl/cogl-driver-gl.c | 5 ++--- cogl/cogl/driver/nop/cogl-driver-nop.c | 3 +-- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c index 5d9ea07be..688c3b37d 100644 --- a/cogl/cogl/cogl-context.c +++ b/cogl/cogl/cogl-context.c @@ -211,7 +211,7 @@ cogl_context_new (CoglDisplay *display, return NULL; } - if (!context->driver_vtable->context_init (context, error)) + if (!context->driver_vtable->context_init (context)) { cogl_object_unref (display); g_free (context); diff --git a/cogl/cogl/cogl-driver.h b/cogl/cogl/cogl-driver.h index 9d0bc1b99..5dcecf862 100644 --- a/cogl/cogl/cogl-driver.h +++ b/cogl/cogl/cogl-driver.h @@ -41,7 +41,7 @@ typedef struct _CoglDriverVtable CoglDriverVtable; struct _CoglDriverVtable { gboolean - (* context_init) (CoglContext *context, GError **error); + (* context_init) (CoglContext *context); void (* context_deinit) (CoglContext *context); diff --git a/cogl/cogl/driver/gl/cogl-util-gl-private.h b/cogl/cogl/driver/gl/cogl-util-gl-private.h index e22a29b1f..52279be67 100644 --- a/cogl/cogl/driver/gl/cogl-util-gl-private.h +++ b/cogl/cogl/driver/gl/cogl-util-gl-private.h @@ -77,8 +77,7 @@ _cogl_gl_error_to_string (GLenum error_code); #endif /* COGL_GL_DEBUG */ gboolean -_cogl_driver_gl_context_init (CoglContext *context, - GError **error); +_cogl_driver_gl_context_init (CoglContext *context); void _cogl_driver_gl_context_deinit (CoglContext *context); diff --git a/cogl/cogl/driver/gl/cogl-util-gl.c b/cogl/cogl/driver/gl/cogl-util-gl.c index abfab26a3..34488c7d8 100644 --- a/cogl/cogl/driver/gl/cogl-util-gl.c +++ b/cogl/cogl/driver/gl/cogl-util-gl.c @@ -76,8 +76,7 @@ _cogl_gl_error_to_string (GLenum error_code) #endif /* COGL_GL_DEBUG */ gboolean -_cogl_driver_gl_context_init (CoglContext *context, - GError **error) +_cogl_driver_gl_context_init (CoglContext *context) { context->texture_units = g_array_new (FALSE, FALSE, sizeof (CoglTextureUnit)); diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c index 041ca2041..bb780cec5 100644 --- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c +++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c @@ -44,11 +44,10 @@ #include "driver/gl/cogl-buffer-gl-private.h" static gboolean -_cogl_driver_gl_real_context_init (CoglContext *context, - GError **error) +_cogl_driver_gl_real_context_init (CoglContext *context) { - _cogl_driver_gl_context_init (context, error); + _cogl_driver_gl_context_init (context); if ((context->driver == COGL_DRIVER_GL3)) { diff --git a/cogl/cogl/driver/nop/cogl-driver-nop.c b/cogl/cogl/driver/nop/cogl-driver-nop.c index 7802803e2..3594a966b 100644 --- a/cogl/cogl/driver/nop/cogl-driver-nop.c +++ b/cogl/cogl/driver/nop/cogl-driver-nop.c @@ -53,8 +53,7 @@ _cogl_driver_update_features (CoglContext *ctx, } static gboolean -_cogl_driver_nop_context_init( CoglContext *context, - GError **error) +_cogl_driver_nop_context_init (CoglContext *context) { return TRUE; }