mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 14:38:13 +02:00
gl: Initialize spans on the context
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
2a453ee7df
commit
c64ec4e49c
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue