On 2/25/07, Bryce Harrington <bryce@...961...> wrote:
We'd been assuming previously that a cairo conversion was going to be a major project already - it was only recently that we got hope that it could be a quick switch. So we had been planning on focusing 0.46 on prepatory refactoring, to get the codebase into a better shape where all-or-nothing switches like cairo could be done a bit easier.
Some of the preparatory work I already started doing, such as planning to eliminate non-premultiplied mode (which cairo does not use, yet PNG and on-screen icons must get non-premultiplied data).
Of course some other preparatory work may be needed. But mostly, it's just grunt work. Someone needs to sit down and convert ALL the stuff. As simple as that.
And the main problem is not that it's a lot of work. The main problem is that all this must be done at once, otherwise it won't work. And that means that the number of bugs after this conversion will be bordering on unmanageable. Not only Inkscape bugs; cairo has its own bugs, several of which I discovered already by the outline mode exercise. They are all reported to cairo but I have no idea when they will be fixed.
This cannot be done on the trunk because SVN must be usable for work every day. And it does not seem to me that branches are a successful strategy in general. Work in branches seems rather prone to dying out soon after branching.
I'm also of the opinion that cairo could make this switch much easier for us if they chose to. If only they could provide an image surface which is not premultiplied and another which uses a byte order compatible with ours on all platforms, most of our problems would be eliminated and the switch could be done very gradually, with proper community testing of every step.
If this is not doable, another thought to incrementalize the mass change would be to incorporate preprocessor macros, and a WITH_CAIRO configure option, that allows us to put the new cairo code while still preserving the old system for those who need to use it. Obviously this incurs some ugliness in the short term.
I guess this is what will be done in the short term, at least for the outline mode to be usable on Macs.