summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2013-05-07 12:01:17 -0700
committerMartin Robinson <mrobinson@igalia.com>2013-05-07 12:01:17 -0700
commit1704292e493b3c635e115df59d07330d19b39514 (patch)
tree458fae034adaaf6e82e77710817ef20bfe694d37
parente83943ec9a06f20572e22105f4e6e44740893eb9 (diff)
gl: Fix compiler warnings in the GL backend
-rw-r--r--src/cairo-gl-composite.c5
-rw-r--r--src/cairo-gl-glyphs.c3
-rw-r--r--src/cairo-gl-msaa-compositor.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index 66389ec94..1dcc6a134 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 34b5d72f3..8a1a548d9 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 28001fea3..83e8eb2d1 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,