summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-04-15 17:58:16 +0200
committerBenjamin Otte <otte@redhat.com>2010-04-15 18:31:00 +0200
commit0a19ad7c104cd81fa2b93aaf7ef9302f50b3f369 (patch)
tree2e792587e2fb1571db0fc4694d0a354e8119167e
parent7745ea21e104d0a5eec1814f19bacb7334f42185 (diff)
gl: Get rid of "return value not checked" warnings
Assert that those functions only return successfully.
-rw-r--r--src/cairo-gl-surface.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index df50db08..8067e9e9 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -1575,18 +1575,21 @@ _cairo_gl_set_tex_combine_constant_color (cairo_gl_context_t *ctx,
{
if (setup->shader) {
const char *uniform_name;
+ cairo_status_t status;
if (tex_unit == 0)
uniform_name = "constant_source";
else
uniform_name = "constant_mask";
- bind_vec4_to_shader(setup->shader->program,
- uniform_name,
- color[0],
- color[1],
- color[2],
- color[3]);
+ status = bind_vec4_to_shader(setup->shader->program,
+ uniform_name,
+ color[0],
+ color[1],
+ color[2],
+ color[3]);
+ assert (! _cairo_status_is_error (status));
+
return;
}
@@ -1833,12 +1836,14 @@ _cairo_gl_set_component_alpha_mask_operand (cairo_gl_context_t *ctx,
case OPERAND_CONSTANT:
/* Have to have a dummy texture bound in order to use the combiner unit. */
if (setup->shader) {
- bind_vec4_to_shader(setup->shader->program,
- "constant_mask",
- setup->src.operand.constant.color[0],
- setup->src.operand.constant.color[1],
- setup->src.operand.constant.color[2],
- setup->src.operand.constant.color[3]);
+ cairo_status_t status;
+ status = bind_vec4_to_shader(setup->shader->program,
+ "constant_mask",
+ setup->src.operand.constant.color[0],
+ setup->src.operand.constant.color[1],
+ setup->src.operand.constant.color[2],
+ setup->src.operand.constant.color[3]);
+ assert (! _cairo_status_is_error (status));
} else {
glBindTexture (ctx->tex_target, ctx->dummy_tex);
glActiveTexture (GL_TEXTURE1);
@@ -2593,12 +2598,13 @@ _cairo_gl_surface_fill_rectangles_glsl (void *abstract_surface,
_cairo_gl_set_destination (surface);
_cairo_gl_set_operator (surface, op, FALSE);
- bind_vec4_to_shader (ctx->fill_rectangles_shader.program,
- "color",
- color->red * color->alpha,
- color->green * color->alpha,
- color->blue * color->alpha,
- color->alpha);
+ status = bind_vec4_to_shader (ctx->fill_rectangles_shader.program,
+ "color",
+ color->red * color->alpha,
+ color->green * color->alpha,
+ color->blue * color->alpha,
+ color->alpha);
+ assert (! _cairo_status_is_error (status));
for (i = 0; i < num_rects; i++) {
vertices[i * 8 + 0] = rects[i].x;