Another update... I've implemented the Cairo support as
Fl_Cairo_Graphics_Device which inherits from Fl_Xlib_Graphics_Device.
This results in all drawing (still excepting fonts) in FLTK being
performed through Cairo. Of course, for the most part everything looks
the same--it would probably take a set of boxtypes which utilize the
Cairo gradient and transparency features to produce a more modern
look. Fl_Dial and anything involving diagonal or curved lines looks
much improved.

Performance-wise, the results are mixed. Drawing straight lines and
rectangles, Cairo is *much* faster. This took me a bit by surprise,
but I guess it's to be expected as Cairo is using XRender to perform
these operations. The difference is probably on the order of 500 or
1000 times faster. However, drawing circles, bent lines, and polygons,
is likewise 1000 times slower or more, which is disappointing. And
means that I probably can't get away with using 100% Cairo rendering
in Non-DAW (at least, not with antialiasing turned on for complex
lines and polygons, such as audio waveforms). I haven't tried the EGL,
GLX, or XCB backends for Cairo yet, who knows, maybe they're faster. I
plan to try XCB anyway in hopes that it will alleviate the extremely
slow drawing that some FLTK users experience.

At the very least, everyone should know that just using XRender to
draw rectangles and lines in FLTK will likely result in pretty drastic
speedups on systems with accelerated graphics...

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to