[Pixman] Simplify iterator initializer signatures

Soeren Sandmann sandmann at cs.au.dk
Sat Mar 12 17:40:53 PST 2011


Søren Sandmann <sandmann at cs.au.dk> writes:

> Here are three patches that simplify the type signature of the
> iterator initializers. The signature before:
>
>     void (*pixman_iter_init_func_t) (pixman_implementation_t *imp,
>                                      pixman_iter_t           *iter,
>                                      pixman_image_t          *image,
>                                      int                      x,
>                                      int                      y,
>                                      int                      width,
>                                      int                      height,
>                                      uint8_t                 *buffer,
>                                      iter_flags_t             flags);
>
>     void (*pixman_iter_init_func_t) (pixman_implementation_t *imp,
>                                      pixman_iter_t           *iter);
>  
> They achieve this by passing all the information in the iterator
> itself rather than as arguments.
>
> This means the role of _pixman_implementation_{src,dest}_iter_init()
> changes. Before they were wrappers around the implementation
> functions; now they are convenience functions that store the various
> parameters in the iterator and then call into the implementation.

Sorry, this mail got sent prematurely. I meant to also include a
diffstat:

 pixman-bits-image.c       |   20 +++++-----------
 pixman-conical-gradient.c |    7 +----
 pixman-general.c          |   56 ++++++++--------------------------------------
 pixman-implementation.c   |   46 ++++++++++++++++++-------------------
 pixman-linear-gradient.c  |   16 ++++---------
 pixman-private.h          |   51 +++++++++++++----------------------------
 pixman-radial-gradient.c  |    7 +----
 pixman-solid-fill.c       |   17 +++++--------
 pixman-sse2.c             |   27 ++++++++++------------
 9 files changed, 84 insertions(+), 163 deletions(-)


Soren


More information about the Pixman mailing list