Re: GTK+, Cairo, XLib integration for fast 2D graphics drawing
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 20 Mar 2012 09:42:19 +0200, Christos Sotiriou <[email protected]> wrote: > On 19 March 2012 20:27, Chris Wilson <[email protected]> wrote: > > 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? I've already fixed the fast-path to catch this case as well. The other thing worth asking about is that in the trace you use an image surface for your rendering. Is this a deliberate change from earlier? For the rendering you are performing, with a good driver, all the overhead will be in cairo converting the strokes into geometry, though I suspect the transfer of the image will be smaller than all the geometry. With cairo-1.12, you may like to use cairo_surface_create_similar_image() instead, as that opens up the possibilities of doing zero-copy uploads. -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo