[cairo] GTK+, Cairo, XLib integration for fast 2D graphics drawing

Christos Sotiriou csotiriou at gmail.com
Tue Mar 20 00:42:19 PDT 2012


On 19 March 2012 20:27, Chris Wilson <chris at chris-wilson.co.uk> wrote:

>
> Thanks. So it appears the bulk of your rendering is in the form of lots
> of tiny stroked rectangles, correct?
>
>
Yes, this is it; most of the objects I draw on the map are small stroked
rectangles.


> stroke: count 255357 [no-op 0], elapsed 1112598240 [97.4%]
>  extents: total 5843148, avg 22.882 [unbounded 0]
>  op: 255357 OVER
>  source: 255357 solid
>  path: 255351 rectliinear, 6 straight
>  antialias: 255357 default
>  caps: 255357 butt
>  joins: 255357 miter
>  clip: 255306 none, 51 region
>
> The truly puzzling part for me is that they seem viable candidates to
> hit the fast-paths, yet end up in the general polygon code.
>
>  << /content //COLOR_ALPHA /width 500 /height 500 >> surface context
> n 22.726562 22.726562 454.546875 454.546875 rectangle
> 0 0.65 1 rgb set-source
> 0.295602 0.913843 scale
> 3.655372 set-line-width
> stroke+
> pop
>
> Oh, I see. A non-uniform, non-integer scale factor. That would explain
> it. Let's see if I can cook up something faster for you.
>

I can round the scaling factor for the cairo_scale() function call; would
that make a big performance difference?

Thanks for looking into this,

Christos.

-- 
--------------------------------------------------------------------------
Christos P. Sotiriou
email: csotiriou at gmail.com
Cell: +30 697 8984 222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20120320/2fe82c6c/attachment.htm>


More information about the cairo mailing list