[cairo-commit] src/cairo-gl-composite.c src/cairo-gl-glyphs.c src/cairo-gl-msaa-compositor.c
Martin Robinson
mrobinson at kemper.freedesktop.org
Tue May 7 12:01:46 PDT 2013
src/cairo-gl-composite.c | 5 ++++-
src/cairo-gl-glyphs.c | 3 ++-
src/cairo-gl-msaa-compositor.c | 6 ++++--
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 1704292e493b3c635e115df59d07330d19b39514
Author: Martin Robinson <mrobinson at igalia.com>
Date: Tue May 7 12:01:17 2013 -0700
gl: Fix compiler warnings in the GL backend
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index 66389ec..1dcc6a1 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -753,7 +753,10 @@ _cairo_gl_composite_begin (cairo_gl_composite_t *setup,
_cairo_gl_context_set_destination (ctx, setup->dst, setup->multisample);
glEnable (GL_BLEND);
- _cairo_gl_set_operands_and_operator (setup, ctx);
+
+ status = _cairo_gl_set_operands_and_operator (setup, ctx);
+ if (unlikely (status))
+ goto FAIL;
status = _cairo_gl_composite_setup_clipping (setup, ctx, ctx->vertex_size);
if (unlikely (status))
diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index 34b5d72..8a1a548 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
@@ -231,7 +231,7 @@ render_glyphs (cairo_gl_surface_t *dst,
cairo_format_t last_format = CAIRO_FORMAT_INVALID;
cairo_gl_glyph_cache_t *cache = NULL;
cairo_gl_context_t *ctx;
- cairo_gl_emit_glyph_t emit;
+ cairo_gl_emit_glyph_t emit = NULL;
cairo_gl_composite_t setup;
cairo_int_status_t status;
int i = 0;
@@ -332,6 +332,7 @@ render_glyphs (cairo_gl_surface_t *dst,
y2 = y1 + scaled_glyph->surface->height;
glyph = _cairo_gl_glyph_cache_lock (cache, scaled_glyph);
+ assert (emit);
emit (ctx,
x1, y1, x2, y2,
glyph->p1.x, glyph->p1.y,
diff --git a/src/cairo-gl-msaa-compositor.c b/src/cairo-gl-msaa-compositor.c
index 28001fe..83e8eb2 100644
--- a/src/cairo-gl-msaa-compositor.c
+++ b/src/cairo-gl-msaa-compositor.c
@@ -356,10 +356,12 @@ _cairo_gl_msaa_compositor_mask_source_operator (const cairo_compositor_t *compos
status = _draw_int_rect (ctx, &setup, &composite->bounded);
else
status = _draw_traps (ctx, &setup, &traps);
+ if (unlikely (status))
+ goto finish;
/* Now draw the second pass. */
- _cairo_gl_composite_set_operator (&setup, CAIRO_OPERATOR_ADD,
- FALSE /* assume_component_alpha */);
+ status = _cairo_gl_composite_set_operator (&setup, CAIRO_OPERATOR_ADD,
+ FALSE /* assume_component_alpha */);
if (unlikely (status))
goto finish;
status = _cairo_gl_composite_set_source (&setup,
More information about the cairo-commit
mailing list