[cairo] basic question?

Carl Worth cworth at cworth.org
Wed Aug 19 07:33:01 PDT 2009


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?

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).

> 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.

> Is there a way to accually check what is being accelerated and what not?

There's not really any universal way. For the xf86-video-intel-driver
at least, you can add:

	Option	"FallbackDebug"	"true"

to your xorg.conf file and that will help you find some things. But it
only finds fallbacks at the lowest level, (in the driver). Above that,
there was a compile-time option in the EXA code

	#define DEBUG_TRACE_FALL 1

which you could turn on when compiling the X server, (in
xserver/exa/exa_priv.h). But I don't know the status of that with UXA
for the Intel driver now.

And above that, there can be fallbacks in cairo as well. A few times
people have proposed patches to make cairo get noisy when it does
fallbacks. I'm not sure that any of that is in cairo master at this
point.

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...)

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090819/8889cf2a/attachment.pgp 


More information about the cairo mailing list