After a conversation with Genete, I thought we should take some time to discuss some of the goals/principles for our migration to a cairo-based renderer.
A new renderer could offer Synfig many benefits:
- Speed. This is main reason we’re undertaking this migration in the first place.
- Standardization. Bringing in more standard graphics concepts (including those used in cairo) will make it easier for Synfig to integrate with other graphics applications.
- Code simplicity/reuse. Having our own rendering infrastructure leads to a larger codebase and makes the project more difficult to maintain.
At the same time, some of Synfig’s unique features are harder to fit into the cairo framework:
- HDR colors: Synfig supports color ranges outside of the normal 0-255
- High bit depth: Cairo uses 8-bit depth, while Synfig uses floating-point color.
- Visually linear color scale (the one that makes Synfig color values differ from virtually every other graphics application)
- Blend methods: Cairo has less of them, and some blend methods with the same name behave differently.
I’m interested in knowing which of the features Cairo would bring you’re most interested it, and which of Synfig’s non-standard features are the least important to you. Also, do you think we should keep a plugin system for different renderers, or focus everything around the use of Cairo?
(Please tell me if I’ve missed something here)
Personally, I believe that standardization is the most import feature. I see speed as a consequence of using standard libraries and tools: the more a piece of software is used, the more effort is put into optimizing it. Likewise, using our own software and conventions when they do not offer a clear advantage over standard practices makes Synfig harder to use, and harder to develop.
Out of Synfig’s feature set, I don’t think it will be feasible to support HDR colors with cairo. I’m not sure how important high bit depth is, but I’m tempted to say that it’s less important for animation than for print and cinema. I would remove Synfig’s custom color scale, but rewrite the interpolation function between colors to behave as if the linear color scale were still in place. I like Synfig’s current blend methods, so I wouldn’t want to touch those.
Synfig doesn’t have a large number of developers, so I would rather focus efforts on a single rendering system than have support for multiple ones. I think it would be best to make cairo the only rendering API for Synfig. Then Synfig will be more standardized, easier to support, and easier for new developers to get into. If there’s a need for HDR and high-precision color, I would wrap whatever image buffers we’re currently using in a cairo-like API and pretend that they’re part of cairo.