question about bad cairo performance on the olpc xo

Ingo Ruhnke grumbel at gmail.com
Mon Sep 6 06:14:39 EDT 2010


On 3 September 2010 07:49, Erik Blankinship <erikb at mediamods.com> wrote:
> I need help understanding why I am getting very poor frame rates when I use
> pycairo to move a large image around the screen on an olpc XO.  When I use
> pycairo to draw a rectangle of the same size on an XO, I get great
> performance!  This is confusing to me because in my experience on other
> platforms, redrawing vector graphics is much, much slower than blitzing
> bitmaps to the screen.

I haven't had a deep look at your code, but slow performance when
blitting bitmaps is almost always the result of your source image and
your screen having different color formats, thus instead of copying
memory around, an expensive conversion is needed each time.

I don't know if it is possible to fix this from within cairo itself,
but you can probably fix it by using a gdk.Pixmap(), see:

http://stackoverflow.com/questions/959675/what-is-the-fasted-way-to-draw-an-image-in-gtk

-- 
WWW:      http://pingus.seul.org/~grumbel/
Blog:     http://grumbel.blogspot.com/
JabberID: xmpp:grumbel at jabber.org
ICQ:      59461927



More information about the Devel mailing list