summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-05-05 12:28:59 +0200
committerBenjamin Otte <otte@redhat.com>2010-05-05 12:30:01 +0200
commit9c594d8b405eba09b07c0a438f5311f5c5e40313 (patch)
treeadb81cbb76359fd50b695ae2d1d1f9d455e17ff3
parenta354f1f92a17378f42d0b703482ae2b8168c7f68 (diff)
gl: Get rid of ctx variable
The code used renderer->ctx and ctx interchangably, that was confusing.
-rw-r--r--src/cairo-gl-surface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index c6aacdf4..2690bd6a 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -2786,7 +2786,6 @@ _cairo_gl_surface_create_span_renderer (cairo_operator_t op,
cairo_region_t *clip_region)
{
cairo_gl_surface_t *dst = abstract_dst;
- cairo_gl_context_t *ctx = (cairo_gl_context_t *) dst->base.device;
cairo_gl_surface_span_renderer_t *renderer;
cairo_status_t status;
cairo_surface_attributes_t *src_attributes;
@@ -2819,17 +2818,18 @@ _cairo_gl_surface_create_span_renderer (cairo_operator_t op,
return _cairo_span_renderer_create_in_error (status);
}
- status = _cairo_gl_operand_init (ctx, &renderer->setup.src, src, dst,
+ status = _cairo_gl_operand_init (renderer->ctx,
+ &renderer->setup.src, src, dst,
rects->source.x, rects->source.y,
extents->x, extents->y,
extents->width, extents->height);
if (unlikely (status)) {
- _cairo_gl_context_release (ctx);
+ _cairo_gl_context_release (renderer->ctx);
free (renderer);
return _cairo_span_renderer_create_in_error (status);
}
- _cairo_gl_set_destination (ctx, dst);
+ _cairo_gl_set_destination (renderer->ctx, dst);
status = _cairo_gl_get_program (renderer->ctx,
renderer->setup.src.source,
@@ -2853,8 +2853,8 @@ _cairo_gl_surface_create_span_renderer (cairo_operator_t op,
/* Set up the mask to source from the incoming vertex color. */
glActiveTexture (GL_TEXTURE1);
/* Have to have a dummy texture bound in order to use the combiner unit. */
- glBindTexture (ctx->tex_target, renderer->ctx->dummy_tex);
- glEnable (ctx->tex_target);
+ glBindTexture (renderer->ctx->tex_target, renderer->ctx->dummy_tex);
+ glEnable (renderer->ctx->tex_target);
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE);