[cairo] Displaying PNGs efficiently with Cairo

Haakon Riiser haakon.riiser at fys.uio.no
Fri Nov 4 05:44:07 PST 2005

I posted some sample code to display a PNG image a while back.  The
problem was that the actual painting of the image is _extremely_
slow.  It takes ~5 seconds to paint a full screen image, and that
does not include the loading/decoding of the image.  The X server
manages to consume 5 seconds of CPU time painting this image, and I
have no idea why.  I hear that Firefox is using Cairo now, and
obviously they don't have this problem.

Can anyone point me in the direction of example code that displays
PNGs efficiently?  (Yeah, there's Firefox, but I'm a bit hesitant to
use a multi-million line code base as a Cairo tuturial. :-)


More information about the cairo mailing list