[cairo] Performance problems in evince with ATI video cards

Behdad Esfahbod behdad at behdad.org
Sun Aug 12 21:41:06 PDT 2007


On Fri, 2007-08-10 at 15:52 -0400, Vladimir Vukicevic wrote:
> > 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);
> ...  (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.)

In fact the correct way to write it without device offset is to pass
those offset numbers to cairo_set_source_surface() (instead of the
current zeros).

behdad

>      - Vlad
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list