summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-05-15 21:26:55 +0200
committerBenjamin Otte <otte@redhat.com>2010-05-17 01:13:46 +0200
commitbf1060252abaa97eb5ce149f8b99055b42096c67 (patch)
tree1cf21253cafad870138492d6a5f0757dfb395060
parent948290de12c5f451d361903f0f52e0cde5527180 (diff)
gl: make show_glyphs use the cairo_composite_t API
-rw-r--r--src/cairo-gl-glyphs.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index aee92351..c3ded412 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
@@ -478,21 +478,24 @@ _render_glyphs (cairo_gl_surface_t *dst,
*has_component_alpha = FALSE;
- memset (&composite_setup, 0, sizeof(composite_setup));
-
status = _cairo_gl_context_acquire (dst->base.device, &ctx);
if (unlikely (status))
return status;
+ status = _cairo_gl_composite_init (ctx, &composite_setup,
+ op, dst, source, NULL,
+ glyph_extents);
+
+ if (unlikely (status))
+ goto CLEANUP_FONT;
+
status = _cairo_gl_operand_init (ctx, &composite_setup.src, source, dst,
glyph_extents->x, glyph_extents->y,
dst_x, dst_y,
glyph_extents->width,
glyph_extents->height);
- if (unlikely (status)) {
- _cairo_gl_context_release (ctx);
- return status;
- }
+ if (unlikely (status))
+ goto CLEANUP_FONT;
_cairo_gl_context_set_destination (ctx, dst);
@@ -642,7 +645,7 @@ _render_glyphs (cairo_gl_surface_t *dst,
glBindBufferARB (GL_ARRAY_BUFFER_ARB, 0);
- _cairo_gl_operand_destroy (&composite_setup.src);
+ _cairo_gl_composite_fini (ctx, &composite_setup);
_cairo_gl_context_release (ctx);