From 9d7fa289132650261e546b39af2371c262f46d3c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 18 Jun 2010 12:18:05 +0200 Subject: 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. --- src/cairo-gl-private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3