[cairo] [PATCH 3/3] gl: Remove fixed-function related code paths

Alexandros Frantzis alexandros.frantzis at linaro.org
Sun Jan 30 04:08:01 PST 2011


On Sun, Jan 30, 2011 at 05:47:38PM +1000, Eric Anholt wrote:
> On Fri, 28 Jan 2011 15:02:54 +0200, Alexandros Frantzis <alexandros.frantzis at linaro.org> wrote:
> > Fixed-function related code paths are no longer used, as we require shader
> > support for the gl backend.
> > ---
> >  src/cairo-gl-composite.c |  106 +--------------------------------------------
> >  src/cairo-gl-device.c    |    6 ---
> >  src/cairo-gl-private.h   |    1 -
> >  3 files changed, 3 insertions(+), 110 deletions(-)
> 
> [...]
> 
> >      case CAIRO_GL_OPERAND_TEXTURE:
> >          glActiveTexture (GL_TEXTURE0 + tex_unit);
> >          glBindTexture (ctx->tex_target, operand->texture.tex);
> > -        glEnable (ctx->tex_target);
> >          _cairo_gl_texture_set_extend (ctx, ctx->tex_target,
> >                                        operand->texture.attributes.extend);
> >          _cairo_gl_texture_set_filter (ctx, ctx->tex_target,
> > @@ -642,7 +569,6 @@ _cairo_gl_context_setup_operand (cairo_gl_context_t *ctx,
> >          glBindTexture (GL_TEXTURE_1D, operand->gradient.gradient->tex);
> >          _cairo_gl_texture_set_extend (ctx, GL_TEXTURE_1D, operand->gradient.extend);
> >          _cairo_gl_texture_set_filter (ctx, GL_TEXTURE_1D, CAIRO_FILTER_BILINEAR);
> > -        glEnable (GL_TEXTURE_1D);
> >  
> >  	glClientActiveTexture (GL_TEXTURE0 + tex_unit);
> >  	glTexCoordPointer (2, GL_FLOAT, vertex_size,
> 
> Have you run this through the testsuite?  It doesn't seem like this
> should work with all the glEnable() of the texturing stripped out.

glEnable(GL_TEXTURE_*) calls have no effect in this case, since we use
shaders exclusively (so texturing is explicitly handled in the fragment
shader).

I have run this through the testsuite and there have been no regressions
on my system.

Thanks,
Alexandros


More information about the cairo mailing list