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.
This commit is contained in:
Benjamin Otte 2010-06-18 12:18:05 +02:00
parent 0f9a8cd18f
commit 9d7fa28913

View file

@ -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;