[cairo] GSoC: Scan converting rasteriser update

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Sun Nov 16 15:12:18 PST 2008


On Fri, 14 Nov 2008, Jeff Muizelaar wrote:

> On Thu, Nov 13, 2008 at 11:28:17PM -0500, Jeff Muizelaar wrote:

>> - it might be good to separate out the _mask_init() and _mask_fini()
>>   changes into a separate patch. i.e. separate out the cosmetic
>>   changes from the behavioural changes.

I've changed the users of the mask_init/fini stuff to use a 
cairo_image_surface_t instead.

>> - the function declaration style of _cairo_image_surface_span_renderer_render_row()
>>   and _cairo_image_surface_span_renderer_destroy() don't match the rest of the file.
>
> - the following line should not have a (void*) cast. It should cast to
>  (struct _cairo_image_surface_span_renderer)
>  	struct _cairo_image_surface_span_renderer *self = (void*)super;

All the self/super stuff has been replaced with the cairo void 
*abstract_foo pattern so now they look like:

static cairo_status_t
_cairo_image_surface_span_renderer_render_row (
     void                                *abstract_renderer,
     int                                  y,
     const cairo_half_open_span_t        *spans,
     unsigned                             num_spans)
{
     cairo_image_surface_span_renderer_t *renderer = abstract_renderer;
     ...
}

New stuff still on the TODO list:

1. Rename the span_renderer->init method to 
->set_composite_rectangles() to clarify the intent of the method.

2. Use an errror span renderer object on creation failure instead 
of returning NULL.

3. Split up the the backend make_span_renderer() into two to 
reflect the two usages: querying the backend to see if it wants 
to make the requested span renderer and actually making it. 
Naming suggestions welcome (can_make_span_renderer() ?)

4. Improve the quality of comments in cairo-tor-scan-converter + 
naming issues: Add a general outline / theory of operation 
section, remove redundant function comments, and explain some of 
the tricky bits better.

Does that sound about right?  I'll ping the list when it's all 
pushed to my cairo repo.  Hopefully in the next few days.

Joonas


More information about the cairo mailing list