<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Zwyk\0142y tekst Znak";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Tekst dymka Znak";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.ZwykytekstZnak
        {mso-style-name:"Zwyk\0142y tekst Znak";
        mso-style-priority:99;
        mso-style-link:"Zwyk\0142y tekst";
        font-family:Consolas;}
span.TekstdymkaZnak
        {mso-style-name:"Tekst dymka Znak";
        mso-style-priority:99;
        mso-style-link:"Tekst dymka";
        font-family:"Tahoma","sans-serif";}
span.hps
        {mso-style-name:hps;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 92.4pt 70.85pt 92.4pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=PL link=blue vlink=purple>
<div class=Section1>
<p class=MsoPlainText>> -----Original Message-----<o:p></o:p></p>
<p class=MsoPlainText>> From: Horodyski Marek (PZUZ)<o:p></o:p></p>
<p class=MsoPlainText>> Sent: Friday, July 15, 2011 12:28 PM<o:p></o:p></p>
<p class=MsoPlainText>> To: cairo@cairographics.org<o:p></o:p></p>
<p class=MsoPlainText>> Subject: Cairo and multithreading einvironment.<o:p></o:p></p>
<p class=MsoPlainText>[…] <o:p></o:p></p>
<p class=MsoPlainText>> Cairo works well in an sigle thread environment, but
I have problems in<o:p></o:p></p>
<p class=MsoPlainText>> multi-threaded.<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>When I use Cairo In MultiThread environment without mutex
synchronize, on monitor I see :<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText><img width=640 height=129 id="Obraz_x0020_2"
src="cid:image001.png@01CC4793.89BEF6E0"
alt="cid:image002.png@01CC1723.7C2D4EA0"><o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>I can work with mutex synchronize, but but it costs time
<span style='font-family:Wingdings'>L</span><o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Example code :<o:p></o:p></p>
<p class=MsoPlainText><span style='color:black'><o:p> </o:p></span></p>
<p class=MsoPlainText><span style='color:black'>hSurface :=
cairo_pdf_surface_create( "TEST.PDF", 566.9, 793.7 ) // 200x280
mm in pt<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>hCairo :=
cairo_create( hSurface )<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>cairo_set_source_rgb( hCairo,
0, 0, 0 )<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>cairo_select_font_face( hCairo,
"verdana", CAIRO_FONT_SLANT_NORMAL, 0 )<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>cairo_set_font_size( hCairo, 6
)<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>cairo_move_to( hCairo, 1, 7 )<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>cairo_show_text( hCairo, "Some
text")<o:p></o:p></span></p>
<p class=MsoPlainText><span style='color:black'>...<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;
color:black'>cairo_show_page( hCairo )<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;
color:black'>cairo_destroy( hCairo )<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;
color:black'>cairo_surface_destroy( hSurface )<o:p></o:p></span></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>String <span style='color:black'>"TEST.PDF" in different
thread are differ.</span><o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Regards,<o:p></o:p></p>
<p class=MsoPlainText>Marek Horodyski<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
</div>
</body>
</html>