February 27, 2007

Xara LX forked to replace rendering engine

Author: Nathan Willis

The Xara LX vector graphics editor took a big step forward last week. After months of gridlock between open source contributors to the project and its corporate owners, one of the contributors published his own fork of the code base -- and the company approved, offering to host it in the official Subversion repository.

The stalemate stemmed from Xara's decision to exclude a single library from its GPL source code release. That library, CDraw, is the rendering engine responsible for rasterizing the workspace contents and drawing it to the screen during an editing session. Xara is very proud of the speed and quality of CDraw, to the point where it cites CDraw's speed as the chief advantage of the product over its competition. But the company feared that releasing the source code to CDraw would constitute giving up its competitive advantage. Thus when it launched the open source Xara LX project, Xara bundled it with a binary-only CDraw -- but one explicitly licensed as freely redistributable.

Outside contributors expressed reluctance to invest time in the Xara LX project, citing dependency on the non-free CDraw as the reason. The project languished, each of the two camps seemingly of the opinion that the other was not holding up its end of the deal -- the coders regarding Xara's partial source code release as insufficient and Xara finding the coders' contributions insignificant.

This month the inaction was replaced by a candid, in-depth debate on the developers' mailing list. Outside contributors and Xara employees traded arguments on the merits of CDraw and the relative risks that opening it would pose to each party.

Xara had long stated an interest in open sourcing CDraw when it deemed the time right, but eventually Xara's Charles Moir conceded that it might never happen at all. Economic realities including Xara's January acquisition by Magix made an open source CDraw a remote possibility.

The turning point came after Moir asserted that the CDraw issue was a red herring. Community development on Xara LX ought to be happening anyway, Moir suggested, regardless of what happened to CDraw. If worse came to worst, he proposed, someone could replace CDraw with an open source renderer like Cairo.

Show me the code

On February 20 Carl Worth -- the principal developer of Cairo -- volunteered to do just that. Worth excised the CDraw library from Xara LX, replaced each call with a dummy function, and posted the code to his public Git repository. Moir replied with an offer to host the code on Xara's servers, and even develop it as an official, parallel branch of Xara LX.

Immediately, the mailing list discussion switched from philosophical debate to practical examination of the code. The stalemate was broken.

Moir is optimistic that the Cairo move will attract additional Linux developers and convince mainstream Linux distributions to include Xara LX. But he maintains a hard line on anyone attempting to port Xara LX to Windows, as that might threaten Xara's revenue stream.

"Our position isn't changed on that. We won't support any Windows port -- not that we can stop it of course if someone wants to really screw up the party. But if that happens and we perceive our business is threatened, then we just stop work on the product and all future work and development goes closed source. I can't see how that helps the open source community at all."

Worth is happy that his CDraw-free Xara LX code is at last producing momentum. "I've always thought [Xara LX] would be a really interesting project, but I've also always thought the non-free CDraw was holding it back much more than Charles realizes. I've told Charles for this whole year that the non-free aspect and uncertainty around CDraw was preventing contribution. If Charles had said a year ago, 'We can't make CDraw free ever,' then I probably would have done this fork back then (it really took almost no time to do). So there's some evidence right there that just clarifying the situation, even in the less desirable direction, is already leading to more contribution."

Although he thinks it would be fun, Worth said he will probably not have much time to contribute to Xara LX himself. But he does anticipate that other people already more familiar with the code base will pick up the effort to turn his fork into a functional app.

Moir said that he, too, looks forward to continuing to develop Xara LX, and that he would like to see more features from the commercial version of the app make it into the open source project. "But it's all a quid pro quo -- if we're getting something back from all the work we've done (and that doesn't mean we have to make money from the Linux market, but that we just grow the user base, have an active developer community, etc.) then it makes sense for us to continue giving and enhancing the Linux version with our new features as well."