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

> On Sun, Jan 27, 2013 at 11:43 AM, Siarhei Siamashka
> <siarhei.siamas...@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
_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to