[cairo] Cairo and multithreading einvironment.
Horodyski Marek (PZUZ)
M.Horodyski at pzuzycie.com.pl
Thu Jul 21 01:58:31 PDT 2011
> -----Original Message-----
> From: Horodyski Marek (PZUZ)
> Sent: Friday, July 15, 2011 12:28 PM
> To: cairo at cairographics.org
> Subject: Cairo and multithreading einvironment.
[...]
> Cairo works well in an sigle thread environment, but I have problems
in
> multi-threaded.
When I use Cairo In MultiThread environment without mutex synchronize,
on monitor I see :
I can work with mutex synchronize, but but it costs time L
Example code :
hSurface := cairo_pdf_surface_create( "TEST.PDF", 566.9, 793.7 ) //
200x280 mm in pt
hCairo := cairo_create( hSurface )
cairo_set_source_rgb( hCairo, 0, 0, 0 )
cairo_select_font_face( hCairo, "verdana", CAIRO_FONT_SLANT_NORMAL, 0 )
cairo_set_font_size( hCairo, 6 )
cairo_move_to( hCairo, 1, 7 )
cairo_show_text( hCairo, "Some text")
...
cairo_show_page( hCairo )
cairo_destroy( hCairo )
cairo_surface_destroy( hSurface )
String "TEST.PDF" in different thread are differ.
Regards,
Marek Horodyski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110721/b7a5ad24/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7297 bytes
Desc: image001.png
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110721/b7a5ad24/attachment-0001.png>
More information about the cairo
mailing list