Hey;<br>
<br>
Though internally cairo is mostly fixed point, its api is floating
point - the 770 ( like most ARM devices ) lacks an FPU and thus any FP
operations ( especially with hardfloat ) are slooooowww and really
should be avoided.<br>
<br>
Also as yet cairo isn't heavily optimised and without any kind of
supported h/w acceleration cairo operations can be very cpu intensive
especially on a relatively large display.<br>
<br>
-- Matthew<br>
<br><div><span class="gmail_quote">On 10/27/05, <b class="gmail_sendername">Kalle Vahlman</b> <<a href="mailto:kalle.vahlman@gmail.com">kalle.vahlman@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hola list!<br><br>I started to write a little Cairo animation to better introduce myself<br>to the wonders of it, and thought I'd do a little Cairo benchmarking<br>with it on the 770.<br><br>The setup:<br><br>Compiled cairo
1.0.2 with vanilla settings, and copied to the device.<br>Compiled my demo with -O3<br>The device was not the latest HW nor SW, so the results might be a tad<br>worse than they are on the current devices. Haven't rerun the
<br>benchmark yet on newer devices.<br><br>The demo:<br><br>It consists of:<br> - creating a XLib surface from the X window<br> - creating image surface for background (only on startup)<br> - copying from that to a buffer surface to clear bg when drawing
<br> - drawing a simple shape with lines and few bezier curves on the buffer surface<br> - copying the drewn areas to the xlib surface<br><br>I don't know if this is the most efficient way to draw with cairo, I<br>might be doing something foolish here and slowing down the process
<br>(please say that I do?-).<br><br>The results:<br><br>Not that convincing.<br><br>I ran the demo with 1, 5 and 10 objects drawn simultaniously, and the<br>FPS calculated from those are 5.71, 2.6 and 1.51.<br><br>So nowhere near "smooth" animation.
<br><br>I tried to compile the cairo with the softfloat toolchain in<br>scratchbox but that made cairo refuse to draw anything (not sure what<br>goes wrong there), although it doesn't crash or complain.<br><br>The timings for the last three items in the above list tell that the
<br>slowest parts are (not suprisingly) the item drawing (0.048s per item<br>consistently) and the transferring to the xlib surface (0.099s for 1<br>item, 0.115s for 10 items).<br><br>Intresting note is that the xlib surface transfer is apparently well
<br>buffered, and does not grow linearily with the item count. Still the<br>initial hit is big enough.<br><br>This is of course presented in the context of animation, but I think<br>that if you can't do smooth animation (somewhere between 10-15FPS)
<br>with simple objects, it won't be fast enough for UI either.<br><br>The biggest bottleneck seems to be indeed the object drawing (I'd<br>guess the beziers are to blame), but I intend to test drawing<br>different types of elements once I get the time, plus a better
<br>profiling of what's taking so long and where.<br><br>The test results are attached, as well as the demo (the code is little<br>messy and contains excess stuff as it's been "evolving").<br><br>--<br>Kalle Vahlman,
<a href="mailto:zuh@iki.fi">zuh@iki.fi</a><br>Powered by <a href="http://movial.fi">http://movial.fi</a><br><br><br>_______________________________________________<br>maemo-developers mailing list<br><a href="mailto:maemo-developers@maemo.org">
maemo-developers@maemo.org</a><br><a href="https://maemo.org/mailman/listinfo/maemo-developers">https://maemo.org/mailman/listinfo/maemo-developers</a><br><br><br><br></blockquote></div><br>