[cairo] Performance problems in evince with ATI video cards

Carlos Garcia Campos carlosgc at gnome.org
Fri Aug 10 13:07:55 PDT 2007

El vie, 10-08-2007 a las 12:52 -0700, Vladimir Vukicevic escribió:
> Carlos Garcia Campos wrote:
> > Hi all, 
> > 
> > we have recently ported evince view to cairo, since poppler renders
> > pages into a cairo surface, we avoid conversions from
> > cairo_image_surface to GdkPixbuf by directly using the cairo_surface to
> > paint the page in the evince view. However, since such port to cairo, we
> > have received some complaints about the slowness of evince and the high
> > cpu usage. It seems that the problem is only reproducible with ATI video
> > cards (although, at least, one nvidia user has reported the bug too). 
> > 
> > The problem has been reported here:
> > 
> > http://bugzilla.gnome.org/show_bug.cgi?id=453123
> > 
> > and it seems to be related to this one:
> > 
> > http://bugs.freedesktop.org/show_bug.cgi?id=4320
> > 
> > The problem is not reproducible for me and I even don't know where the
> > problem actually is (cairo, xorg, ati driver, evince, ...), so it's
> > almost impossible to me fixing it. 
> > 
> > FWIW in evince I'm doing something like this:
> > 
> > cr = gdk_cairo_create (view->layout.bin_window);
> > cairo_translate (cr, overlap.x, overlap.y);
> > cairo_surface_set_device_offset (page_surface,                                                                       
> >                                                  overlap.x - real_page_area.x,                                                       
> >                                                  overlap.y - real_page_area.y);
> > cairo_set_source_surface (cr, page_surface, 0, 0);                                                                   
> > cairo_paint (cr);
> What type of surface is page_surface?


> If you're drawing to the display, you may want to try creating it as an 
> image surface and see how that goes.  But yes, as Jeff said, profiling 
> is your best bet.  

I would like it, but the problem is not reproducible for me. Maybe
someone who is affected by the problem could provide more information. 

> (Also, setting a device offset before you draw is odd 
> -- you really just want to translate to the right place and draw a 
> rectangle that you fill, though that shouldn't be affecting performance.)

I've already tried that, but it didn't work. When using cairo_rectangle
and cairo_fill instead of cairo_paint the page is rendered well, however
after scrolling, some parts of page disappear. I don't know why, but the
only way it works as expected is with set_device_offset and

>      - Vlad

Carlos Garcia Campos
   elkalmail at yahoo.es
   carlosgc at gnome.org
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
Url : http://lists.cairographics.org/archives/cairo/attachments/20070810/0a0913c3/attachment.pgp 

More information about the cairo mailing list