From 64f90322f73c37ac5667292949bb45b0279239d9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 18 Jun 2010 12:40:48 +0200 Subject: gl: Refactor status handling in _cairo_gl_context_release() Previously, the code returned a status and required the caller to mangle this status with his own status. Now, the function takes the previous status ass an argument and does the mangling itself. Also contains fixes for all the callers to actually check the return value - which is now rather trivial as it just requires passing through the status variable. --- src/cairo-gl-composite.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/cairo-gl-composite.c') diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c index 0614fa35..67059a78 100644 --- a/src/cairo-gl-composite.c +++ b/src/cairo-gl-composite.c @@ -57,9 +57,7 @@ _cairo_gl_create_gradient_texture (cairo_gl_surface_t *dst, status = _cairo_gl_gradient_create (ctx, pattern->n_stops, pattern->stops, gradient); - _cairo_gl_context_release (ctx); - - return status; + return _cairo_gl_context_release (ctx, status); } /** @@ -994,7 +992,7 @@ _cairo_gl_composite_begin (cairo_gl_composite_t *setup, FAIL: if (unlikely (status)) - _cairo_gl_context_release (ctx); + status = _cairo_gl_context_release (ctx, status); return status; } -- cgit v1.2.3