diff options
author | Benjamin Otte <otte@redhat.com> | 2010-06-18 12:18:05 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-06-18 16:31:52 +0200 |
commit | 9d7fa289132650261e546b39af2371c262f46d3c (patch) | |
tree | 5640ac44e5ed7f7e0951c2b815e8c8c7fe949328 | |
parent | 0f9a8cd18f14b1f23aaefe14db3b5ad07c84cff7 (diff) |
gl: Don't assert if there used to be a GL error
When acquiring the GL context, do not assert that the GL context is not
in an error state. Do not even call _cairo_error(). Handling GL errors
in other code is not Cairo's responsibility.
Instead just clear all previous errors so we don't accidentally set
surfaces into error states to unrelated errors.
-rw-r--r-- | src/cairo-gl-private.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h index 2cb1425d..e8db124d 100644 --- a/src/cairo-gl-private.h +++ b/src/cairo-gl-private.h @@ -299,7 +299,8 @@ _cairo_gl_context_acquire (cairo_device_t *device, if (unlikely (status)) return status; - assert (_cairo_gl_check_error () == CAIRO_STATUS_SUCCESS); + /* clear potential previous GL errors */ + _cairo_gl_get_error (); *ctx = (cairo_gl_context_t *) device; return CAIRO_STATUS_SUCCESS; |