[cairo] GSoC: Scan converting rasteriser update

Jeff Muizelaar jeff at infidigm.net
Wed Oct 1 14:14:31 PDT 2008


On Wed, Oct 01, 2008 at 01:04:32PM -0700, Carl Worth wrote:
> On Wed, 2008-10-01 at 15:19 -0400, Jeff Muizelaar wrote:
> > Overall comments:
> > - I don't really like the make_span_renderer interface. It might be better if
> >   instead of relying on the fallback surface, we had helpers that would be called from
> >   the image surface's fill and stroke methods.
> 
> Agreed.
> 
> This approach is a general one that could be applied liberally to
> cairo's code base to clean it up considerably. That is, it would be nice
> to have explicit code in each backend for each interface, calling into
> specific helper functions, rather than just returning UNSUPPORTED and
> relying on the fallback code to do something, (which might not be
> optimal across all backends). And even if the fallback code doesn't
> perform poorly, it makes the code much harder to read.
> 
> We've had that idea for a long time, but haven't gotten around to
> cleaning up any existing interfaces to make the switch. But I definitely
> agree that I'd like to see new interfaces added with this new style.

I think a good rule of thumb here is that the image surface should
always implement any methods that could cause fallbacks and shouldn't
ever return UNSUPPORTED from any of these.

e.g. it should implement paint(), mask(), stroke(), fill() and
show_glyphs()

-Jeff


More information about the cairo mailing list