[Pixman] 0.29.2

Siarhei Siamashka siarhei.siamashka at gmail.com
Mon Jan 28 13:23:47 PST 2013


On Sun, 27 Jan 2013 13:41:44 -0800
Matt Turner <mattst88 at gmail.com> wrote:

> On Sun, Jan 27, 2013 at 11:43 AM, Siarhei Siamashka
> <siarhei.siamashka at gmail.com> wrote:
> > Still, I'm not very happy about the code duplication. We already have
> > similar iterators (fetch only, no writeback) in "pixman-mmx.c":
> >
> >     http://cgit.freedesktop.org/pixman/tree/pixman/pixman-mmx.c?id=pixman-0.28.2#n3904
> >
> > Ideally, a lot of this code can be reused in different backends. The
> > only unique parts are just the fetch/store functions themselves.
> 
> I'm not sure I understand totally. Is the suggestion adding writeback
> iterators, thereby allowing the removal of src_x888_0565?

The writeback iterator is useful not only for src_x888_0565 removal
(which is just a nice side effect). Whenever you are doing something
with r5g6b5 destination, it is first fetched into a temporary buffer,
modified and finally written back. If you don't provide an optimized
writeback iterator, just C implementation is going to be used.

But I tried to make another point. The iterators need a bit of support
code, for example checking various flags and conditions. And a
significant part of this support code might be possibly reused by
different backends, avoiding unneeded duplication.

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list