[Pixman] [cairo] is self-copy supposed to work?

Soeren Sandmann sandmann at daimi.au.dk
Wed May 5 05:36:58 PDT 2010


Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:

> On Tuesday 04 May 2010, Benjamin Otte wrote:
> > On Tue, 2010-05-04 at 17:45 +1200, Matt Woodrow wrote:
> > > Cairo doesn't actually use pixmin_blt anywhere sadly, everything goes
> > > through pixman_composite_32.
> >
> > This is by design. Or said differently: I spent a bunch of time
> > replacing calls to pixman_blit() with calls to
> > pixman_image_fill_boxes(). And I did that because it makes the code more 
> > flexible (you can plug in more formats easily) and avoids code
> > duplication (the code figuring out what to blit doesn't need to be
> > duplicated in both pixman and cairo).
> 
> In the end, 'pixman_image_fill_boxes' still contains a call to 'pixman_fill'
> (for performance reasons?). So 'pixman_fill' is not retired completely.
> And regarding flexibility, 'pixman_fill' still does not supports formats with
> less than one byte per pixel. This looks like a bug.

Is it actually _buggy_? color_to_pixel() only returns TRUE if the
format is wider than a byte, so that is the only case where
pixman_fill() actually gets called. In the other cases it falls back
to composite.

> But the point is that fast scrolling (quite a common operation, not something
> totally fancy) requires self-copy support. So IMHO it makes sense to have this
> functionality somehow implemented in pixman and available in some usable way
> to application developers (Firefox et al.)

Agreed, and let me repeat that it would make sense to move the X
server core primitives, including XCopyArea() and XFillRectangles()
into pixman.

There is the beginning of a branch to move FbBlt(), which is the meat
of XCopyArea(), here:

    http://cgit.freedesktop.org/~sandmann/pixman/log/?h=blt

However, this won't make 0.20.0 unless someone makes it happen.


Soren


More information about the Pixman mailing list