diff options
author | Benjamin Otte <otte@redhat.com> | 2010-06-18 12:23:37 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-06-18 16:31:52 +0200 |
commit | fc3d521c121da237974e486f1b7735009764b441 (patch) | |
tree | 726b15a13bec51ca55cc17f076b87d235edf8525 | |
parent | 9d7fa289132650261e546b39af2371c262f46d3c (diff) |
gl: Inline the check_error() function
-rw-r--r-- | src/cairo-gl-private.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h index e8db124d..67fc864d 100644 --- a/src/cairo-gl-private.h +++ b/src/cairo-gl-private.h @@ -234,21 +234,6 @@ _cairo_gl_get_error (void) return err; } -static cairo_always_inline cairo_status_t -_cairo_gl_check_error (void) -{ - cairo_status_t status; - GLenum err; - - err = _cairo_gl_get_error (); - if (unlikely (err)) - status = _cairo_error (CAIRO_STATUS_DEVICE_ERROR); - else - status = CAIRO_STATUS_SUCCESS; - - return status; -} - static inline cairo_device_t * _cairo_gl_context_create_in_error (cairo_status_t status) { @@ -310,8 +295,14 @@ static cairo_always_inline cairo_warn cairo_status_t _cairo_gl_context_release (cairo_gl_context_t *ctx) { cairo_status_t status; + GLenum err; + + err = _cairo_gl_get_error (); + if (unlikely (err)) + status = _cairo_error (CAIRO_STATUS_DEVICE_ERROR); + else + status = CAIRO_STATUS_SUCCESS; - status = _cairo_gl_check_error (); cairo_device_release (&(ctx)->base); return status; |