[cairo] Librsvg + cairo animation flicker

Dominic Lachowicz domlachowicz at gmail.com
Thu Oct 1 10:10:38 PDT 2009


Hi Enrique,

RE: thread safety, you shouldn't call rsvg_handle_render_cairo() on
the same handle and cairo surface concurrently from multiple threads.

librsvg draws directly to the cairo surface, so from the limited
information you provided, I can't imagine why it would behave
differently than your direct calls to cairo.

Is your flicker due to how long it takes to render the SVG? If that's
the case, you might want to cache your SVG sprites as image surfaces,
and then blit them onto your SDL surface.

Best,
Dom

On Thu, Oct 1, 2009 at 12:24 PM, flying.toaster <flying.toaster at voila.fr> wrote:
> Hi all
>
>  I am trying to put up an application animating SVG objects (as sprites) with Librsvg and cairo on top of SDL on a Win32 rig (yeah, that IS weird).
> I am using a SDL timer to update periodically the image.
> I have tried all sorts of backbuffering (cairo surfaces, SDL surfaces) but I still get a terrible flicker on the parts that are drawn through a call to rsvg_handle_render_cairo. Parts drawn through direct calls to cairo do not exhibit this flicker.
> Wondering if this function is thread unsafe or something... Has anybody a clue on this kind of issue ?
>
> Thanks in advance
>
> Enrique
>
> ____________________________________________________
>
> Retour sur un week-end chargé en exploits sur http://sports.voila.fr/
>
>
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo



-- 
"I like to pay taxes. With them, I buy civilization." --  Oliver Wendell Holmes


More information about the cairo mailing list