[cairo] Re: Redraw speed issues

David Reveman c99drn at cs.umu.se
Wed Apr 7 14:57:48 PDT 2004


On Wed, 2004-04-07 at 14:22 -0600, Charles Tuckey wrote:

> Hi David,
> 
> Thank you for your answers to our last set of questions. We are 
> continuing to explore using the OpenGL backend for our product.
> 
> I ran two instantions of the cairo-demo program on a RedHat 9 machine; 
> one program using the glx backend and the other using xrender. I 
> expected the redraw time for the glx demo to be at least as fast as the 
> xrender demo. However, this was not the case. The glx demo redraw was 
> substantially slower than the xrender demo redraw (by substantially,  I 
> mean about 5-10 times slower). I observed substantially the same 
> performance with the spline and knockout demos as well.
> 
> Do you have any idea why this might be? Suggestions for further study 
> would be appreciated as well.
> 
> Here is some relevant information:
> 
>      OS distro: Linux RedHat 9
> 
>      XFree86 version: 4.3.0
>      xdpyinfo reports GLX as an extension
> 
>      OpenGL vendor string: NVIDIA Corporation
>      OpenGL renderer string: GeForce2 MX/AGP/SSE/3DNOW!
>      OpenGL version string: 1.4.1 NVIDIA 53.36
> 
>      Using cairo-0.1.19-gl-r6  and  libglc-0.1.0-r3
> 
> I don't if this information is of use but here is the experiment I did 
> and the results. I ran cairo-demo and then occluded the demo window with 
> another window. I uncovered the demo window, waited for it to redraw and 
>   then repeated the process. I gathered CPU usage data as follows:
>             Demo program     X Server
> xrender       10%              81%
> glx           16%              74%
> 
> An anomaly that I observed was that the glx demo CPU usage climbed to 
> about 75% after I quit covering and uncovering the window. It stayed 
> there for about 10 seconds before dropping. This didn't happen with the 
> xrender demo.
> 
> 
> Thanks for your time David.
> 
> 
> charlie

First, I highly recommend you to checkout the latest version of cairo
and glitz from CVS. Patch cairo with my latest GL patch (the pattern
patch is no longer needed).

The graphics card you're using should work fine. However, it doesn't
support fragment programs or multi-sampling so if like to get maximum
acceleration and anti-aliasing from OpenGL backend you'll need to be
using a GeForceFX card.

Regarding the redraw performance of the cairo-demo applications:

cairo-demo is slow because it uses text. Cairo does not support glyph
caching right now, so until we've get that fixed, freetype rendered text
will be very slow with the OpenGL backend.

cairo-spline and cairo-knockout uses double-buffering so xrender never
actually redraws anything on exposure events (when uncovering the
window). The OpenGL backend redraws everything on an exposure event.
However, if you get the latest cairo-demos-shading-glx.tar.gz the
cairo-spline demo should have better redraw speed.

- David

-- 
David Reveman <c99drn at cs.umu.se>





More information about the cairo mailing list