[cairo] basic question?
Theo Veenker
T.J.G.Veenker at uu.nl
Wed Aug 19 15:13:23 PDT 2009
Carl Worth wrote:
> Excerpts from Theo Veenker's message of Tue Aug 18 23:53:40 -0700 2009:
>> Glad this topic comes up. It's my experience that drawing into a backbuffer
>> and copying that to the window (which is what Charles wants) is actually
>> /faster/ than drawing directly onto the window.
>
> When you say "backbuffer" do you mean drawing to an offscreen Pixmap,
> or drawing with the image backend?
I tried both cairo_image_surface_create and cairo_surface_create_similar.
>
> There are certainly cases where drawing to a Pixmap rather than a
> Window will be faster, (think about how compositing managers might get
> involved with drawing to a Window for example).
>
> Anytime that drawing to a Pixmap is slower than drawing with the image
> backend means there's a bug somewhere, (either in cairo, the X server,
> or the X server's video driver). So please report those with
> specifics, (like cairo traces).
IIRC I didn't see much difference here. I can't check ATM because I'm tied
up with stuff that I need to finish before the new academic year begins.
>
>> etc.) but with backbuffering on it is faster and causes less CPU load than
>> when I let the X server do all the drawing.
>
> That's where I'm confused. Your buffering would ideally be to a Pixmap
> and the X server would still be doing drawing.
I'm withdrawing that statement. What I meant was drawing onto a window is in
my experience slower than drawing onto an off-screen buffer (image or pixmap)
and copying that to the same window.
Kalle Vahlman suggested what could be the cause of this in this thread:
http://lists.cairographics.org/archives/cairo/2008-January/012852.html
>
>> Is there a way to accually check what is being accelerated and what not?
>
> So yes, we definitely have room to improve some tools here. (Queue
> Chris telling me what I missed as well as the great plans he has in
> this area...)
It would be very be nice to have such tools. I understand however there's
a lot of work to be done before Chris can ride his pony.
Theo
More information about the cairo
mailing list