[Pixman] [PATCH 0/18] Add iterators to images

Søren Sandmann sandmann at cs.au.dk
Wed Jan 5 18:09:38 PST 2011


The following patch series changes the scanline access to be based on
iterators instead of direct calls to virtual functions. There are
several benefits to this:

- Since destination iterators are different from source iterators, we
  can fix the bug we have currently, where destination transformations
  and filters are not being ignored as they should.

- The annoying "classify" virtual functions can be eliminated.

Both of those are fixed in the patch series. There are some other
potential benefits:

- The initialization of the iterators is virtualized, so that a CPU
  specific implementation can plug in its own fetcher. This means we
  can have SIMD accelerated gradients and fetchers.

- Fetchers for NONE-extended images would be able to reuse the
  generated scanlines for the initial and final zero-lines, and could
  avoid reinitializing the zero parts of most scanlines if there is
  no transformation.

- A hypothetical polygon image couldn't support random access to
  scanlines, so it would need something like this, where the scanlines
  are guaranteed to be fetched in order.

None of these are done yet, though.

Comments appreciated.


Thanks,
Soren


 pixman/pixman-arm-common.h       |    9 -
 pixman/pixman-bits-image.c       |  230 ++++++++++++++++++++++++++-----
 pixman/pixman-conical-gradient.c |   45 ++++--
 pixman/pixman-fast-path.c        |   22 +-
 pixman/pixman-general.c          |  288 +++++++++++++++++++--------------------
 pixman/pixman-image.c            |   92 +-----------
 pixman/pixman-implementation.c   |   82 ++++++++++-
 pixman/pixman-linear-gradient.c  |   86 ++++++++---
 pixman/pixman-mmx.c              |   22 +-
 pixman/pixman-private.h          |  171 ++++++++++++++---------
 pixman/pixman-radial-gradient.c  |   44 ++++-
 pixman/pixman-solid-fill.c       |   75 +++-------
 pixman/pixman-sse2.c             |   30 ++--
 pixman/pixman-utils.c            |    6 
 test/alphamap.c                  |   11 -
 15 files changed, 743 insertions(+), 470 deletions(-)




More information about the Pixman mailing list