diff options
author | Benjamin Otte <otte@redhat.com> | 2010-06-18 12:40:48 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-06-18 16:31:52 +0200 |
commit | 64f90322f73c37ac5667292949bb45b0279239d9 (patch) | |
tree | 7da984e58cdac61f1e2913cfd5445032710b847f /src/cairo-gl-composite.c | |
parent | fc3d521c121da237974e486f1b7735009764b441 (diff) |
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.
Diffstat (limited to 'src/cairo-gl-composite.c')
-rw-r--r-- | src/cairo-gl-composite.c | 6 |
1 files changed, 2 insertions, 4 deletions
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; } |