summaryrefslogtreecommitdiff
path: root/src/cairo-gl-composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-02 11:00:40 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-02 11:00:40 +0000
commitc64ec4e49c1f06a451187d5f8360df09a777f61c (patch)
treea41e3398e8f3ec867ad890e6ea07b7e1c5de8b00 /src/cairo-gl-composite.c
parent2a453ee7df543441986b0a52ec2c2de72005c091 (diff)
gl: Initialize spans on the context
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-gl-composite.c')
-rw-r--r--src/cairo-gl-composite.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index 2f9697a7..17732d38 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -269,6 +269,7 @@ _cairo_gl_context_setup_spans (cairo_gl_context_t *ctx,
GL_UNSIGNED_BYTE, GL_TRUE, vertex_size,
(void *) (uintptr_t) vertex_offset);
dispatch->EnableVertexAttribArray (CAIRO_GL_COLOR_ATTRIB_INDEX);
+ ctx->spans = TRUE;
}
void
@@ -520,9 +521,11 @@ _cairo_gl_composite_begin (cairo_gl_composite_t *setup,
mask_size = _cairo_gl_operand_get_vertex_size (setup->mask.type);
vertex_size = dst_size + src_size + mask_size;
- if (ctx->vertex_size != vertex_size) {
+ if (setup->spans)
+ vertex_size += sizeof (GLfloat);
+
+ if (ctx->vertex_size != vertex_size)
_cairo_gl_composite_flush (ctx);
- }
_cairo_gl_context_set_destination (ctx, setup->dst);