I finally got around to writing a little test program for FLTK graphics performance.
This is with an Fl_Single_Window, where Cairo is drawing directly into an Xlib window surface. Performance with Fl_Double_Window (where Cairo is drawing into an X pixmap) is similar, but slightly slower. I haven't tried having Cairo draw into one of its own image surfaces or any other backend yet. Here's the lowdown: On my 2.6Ghz AMD64 system with Radeon graphics, Drawing 400 of each: FL_UP_BOX FL_FLAT_BOX FL_ROUNDED_BOX FL_OVAL_BOX takes 8.49ms 0.041ms 255.84ms 0.106ms with Xlib calls and 12.23ms 0.95ms 3294.78ms 3821.71ms with Cairo. As you can see, the circles (and really anything not properly aligned to pixel boundaries) are much much slower with Cairo. In fact, the Xlib circle is ridiculously fast (if somewhat ugly). Performance for straight lines and rectangles 'properly' aligned to pixel boundaries is not that far of, but a definitely a little slower with Cairo. I believe the reason I originally thought Cairo was faster with rectangles had to do with an unrelated factor (the cost of dashed vs. solid lines). Of course, I can't get comparable numbers for GTK without also writing a GTK test program (the numbers from gtkperf are hard to interpret in this context).
_______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev