<div dir="ltr">On Tue, Aug 26, 2008 at 2:28 PM, Owen Taylor <span dir="ltr"><<a href="mailto:otaylor@redhat.com">otaylor@redhat.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">> I find it quite interesting that dib is faster than ddb. In<br>
> particular, the ExtTextOutW call is tremendously slower, and yet the<br>
> DDB case seems to incur much more overhead in<br>
> cairo_gstate_show_text_glyps for the DDB case. Is this to be<br>
> expected?<br>
<br>
</div>Check in a debugger that you have a direct code path:<br>
<br>
cairo_show_text() =><br>
_cairo_gstate_show_text_glyphs() =><br>
_cairo_win32_surface_show_glyphs() =><br>
ExtTextOutW()<br>
<br>
If you hit a fallback path instead, why it's hitting the fallback path (whether<br>
it's a cairo bug or something you are doing) is why it is slow.</blockquote><div><br>Unfortunately, I can't actually directly debug this (or at least I haven't figured out how to convince a debugger to load the symbols) due to how we're dynamically loading the DLL and calling into function pointers.<br>
<br>However, I am 100% sure that the call goes through the above chain, culminating in ExtTextOutW. I can't promise there aren't other function calls in between those callers, since I can't look at a stack, but I suspect that's enough.<br>
<br>Anyway, I guess right now the big thing is, there's an awful lot of overhead incurred on the way to ExtTextOutW; the actual ExtTextOutW call takes a minority of the time, even in the DIB case. Is this surprising, or is this seen as an inevitable result from having a rich API? <br>
</div></div><br>Thanks for your help,<br><br>Damian<br></div>