From f61b3f25aff454800a9d6013012d41633139d896 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 8 Jun 2010 12:03:36 +0200 Subject: [PATCH] gl: Add an assertion that we always have a texture When painting, the sources must be textures and not windows, and we did that wrong previously. This assertion makes sure that never happens again. --- src/cairo-gl-composite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c index ca96b6b3c..ddb06d6df 100644 --- a/src/cairo-gl-composite.c +++ b/src/cairo-gl-composite.c @@ -100,6 +100,7 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand, } assert (surface->base.backend == &_cairo_gl_surface_backend); + assert (_cairo_gl_surface_is_texture (surface)); operand->type = CAIRO_GL_OPERAND_TEXTURE; operand->texture.surface = surface;