« Call for testing: cairo-1.0.0 | Main | Call for testing: cairo backend for win32 (Take 2) »
September 26, 2005
Call for testing: cairo backend for win32
As you might have heard from the Mozilla SVG weblog, we've been considering changing the backend graphics library for Mozilla SVG on win32 from GDI+ to cairo. The primary reason for switching is support - using cairo we can have SVG just work out of the box for everyone, rather than requiring people on pre-XP systems to download and install GDI+ (which realistically speaking, a typical user won't do). For content authors, the switch means that all platforms will be using the same graphics library and will behave similarly (rather than having unfixable discrepancies, like GDI+'s radial gradient repeat modes).
For these reasons we are planning on switching backends to cairo prior to Firefox 1.5. We do not take this step lightly, but think it's in the best interest for the future of SVG in Mozilla.
We have created a build of Firefox 1.5 beta 1 that uses the cairo library as the backend instead of GDI+. Our own testing hasn't found any serious problems, but we would like more widespread testing. If you could download and use it for testing SVG content to help us find any issues we may have missed it would be greatly appreciated.
The cairo build may be obtained from the following link. It will unzip with a "bin" directory containing the firefox executable.
Please test and respond with your findings. Please be specific about problems encountered and URLs to the content in question if possible. In addition to testing just SVG content, try complicated DHTML sites as well to check the new backend isn't overwriting memory.
Some general notes about testing new builds: by default Firefox checks to see if there's another running Firefox, and if so just sends it a message to open a new window. The easiest way to make sure you're really running the cairo version of Firefox is to make sure all Firefox windows are closed before starting a new build. The cairo build can easily be distinguished from the official 1.5b1 release by the unofficial build artwork (blue globe icon and "deer park" labeling).
Note that as this cairo build is based on Firefox 1.5 beta 1, it is vulnerable to the recently publicized IDN buffer overflow problem. You can protect yourself by going to this document and following the "Manually Configuring the Browser" steps:
Two bugs are known:
- Dashed curved lines show solid. This is a limitation of cairo-1.0.0, fixed in 1.0.2 which we hope will be released in time to be considered for Firefox 1.5
- Curved paths sometimes have a wedge missing. This appears to be bug specific to cairo on win32, as the same SVG renders fine with cairo on linux. Under investigation.
Posted by tor at September 26, 2005 5:20 PM
Comments
We are developing a GIS on-line application based on DHTML, SVG, ecmascript and remote data access via WFS and WMS. You can see an example of our prototype at:
http://devel0.gcrc.carleton.ca/atlas/prototype_0.3/superfrank/v3/simple_map.xml.html
This example works fine with Firefox-1.5b1 with GDI, but does not work at all with the cairo backend. I observe the map being erased as the mouse hovers over "active" areas. Those active areas respond to mouse events and change colour, opacity or display attributes.
This is a complex application and you can contact me directly if you need more detailed information.
Posted by: JP Fiset at September 26, 2005 6:11 PM
When I tried loading this svg example
http://www.w3.org/TR/SVG/images/shapes/rect01.svg, firefox started automatically opening a lot of new tabs.
Posted by: i5mast at September 26, 2005 6:18 PM
i'm on win2k.
Posted by: i5mast at September 26, 2005 6:18 PM
http://www.grauw.nl/logs/useragent.php
The SVG overthere looks different, the font is smaller, and the text can’t be selected anymore.
http://www.grauw.nl/articles/demos/svg_draai_pokiyhgfd!.xhtml
Seems to work just fine.
That’s all the SVG I’ve got :).
The SVG at http://bert.kapiteinvlees.nl/vector.php also doesn’t seem to render worse than it did before (not all that bad, really :)).
No particular problems accessing my company’s DHTML website either, at http://www.backbase.com/
~Grauw
Posted by: Laurens Holst at September 26, 2005 6:47 PM
printing ist completely busted
Posted by: at September 26, 2005 6:57 PM
at least printing of svg, which works fine with gdi
Posted by: at September 26, 2005 6:58 PM
Call me conservative, but introducing such a huge change so late in the game is not something I would call best-practise.
Such a change should be introduced early in an alpha cycle, not late in a beta cycle.
I urge you to reconsider this.
Posted by: Simon Paquet at September 26, 2005 7:53 PM
Confirming that printing SVG content under cairo is busted. Printed SVG drawing to 11x17 layout fine under GDI but under cairo it looks like a bad 2x3 thumbnail. Font sizes are correct to the requested image size, placement is relative to the small resulting size, and appears fill="none" is not recognized. Transparent GIF's show black as transparent color.
Posted by: Bruce R at September 26, 2005 8:24 PM
http://www.treebuilder.de/svg/removeChild/removeChild.svg
Try running that site with Cairo SVG. It's extremely slow on my PC (Intel Celeron M 1.6 GHz, 256MB RAM), to the point where the bubbles will spawn, but none will actually move because it's so slow.
Highlighting text make the text blue, when I try to deselect it stays blue. The same thing happens when opening a context menu. Many of the examples on Treebuilder.de make parts of the SVG just go blue, especially after animations.
Memory usage seems to be down though, which I greatly appreciate as it would soar uncontrollably with GDI+ ... the performance tradeoff I'm less excited about.
Posted by: Foxtrot at September 26, 2005 8:55 PM
http://www.croczilla.com/svg/samples/xbl2/xbl2.xml
When moving the triangles to the right, they suddenly disappear in the Cairo build.
Posted by: Martijn at September 26, 2005 9:35 PM
I'm experiencing similar problems as JP Fiset where objects/regions disappear after certain mouse events. I will try to make simple examples which demonstrate the problem, but I urge you to reconsider switching this late. From playing around with this beta, it looks like there's a lot more to uncover...
Posted by: Schuyler at September 26, 2005 10:25 PM
The missing geometry experienced by JP Fiset, Foxtrot, and Martijn turned out to have a common simple problem - fix under review. There is still a problem with redrawing text that I'm looking at.
Thanks for pointing out the printing problem. It's exercising a code path that hadn't been run on windows before (the switch between using a native surface and an image) and is behaving differently than expected.
Posted by: tor at September 27, 2005 12:17 AM
Foxtrot: that bubble example is quite neat. I'm not seeing any significant performance difference between the official 1.5b1 and the cairo build on this laptop (Intel Pentium M 1.7GHz). Both run fast enough to bubble smoothly.
Posted by: tor at September 27, 2005 12:28 AM
foreignObject looks busted:
http://www.croczilla.com/svg/samples/foreign1/foreign1.xml
Posted by: Todd at September 27, 2005 12:45 AM
foreignObject was disabled some time ago in Mozilla SVG due to incompleteness, and will not be in Firefox 1.5.
Posted by: tor at September 27, 2005 12:49 AM
These tests all look busted:
http://www.w3.org/Graphics/SVG/Test/20011026/toc-sv.svg
although, I'm not sure if they worked before either...
Posted by: Todd at September 27, 2005 12:51 AM
Todd: all those tests are missing the svg namespace.
Posted by: tor at September 27, 2005 1:42 AM
Unfortunately I have to agree to others. I went through all Samples given in the comments so far and the performance of the cairo backend compared to GDI in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050917 Firefox/1.4 ID:2005091707
seems about five times slower. Estimated from looking at the bubbles and triangles examples.
This is on a Dell I8100 Notebook (1MHz)
Vote for keeping GDI for now :(
Posted by: Jens at September 27, 2005 7:14 AM
While I am all for the cairo move (hoping that it will improve cairo on other platforms as well), currently it means a step back in display quality for WinXP users.
See our age pyramid example and the aligning of the bars (shape-rendering:optimizeSpeed):
http://static.flickr.com/25/47075988_c4b3bfbf48_o.png
sorry, I can't put the code online but can send it again via e-mail if necessary.
Posted by: Michael N. at September 27, 2005 11:27 AM
2 Bugs:
1.) In this easy testcase I draw 4 JPEG images.
Firefox makes white lines between the jpeg images.
2.) If I open the windows start-menu and this menu is on top of the svg image in Firefox -
the start menu leaves a white rectange. The redraw does not work.
-------
In bigger applications there are many problems with these white rectangles.
There also seems to be a problem with z-index while redraw the image. New elements in the DOM
tree seams to be drawn at topleavel first und than sent back to the place they belong to.
The white rectanges sometimes appear after the picture is completly rendernd - looks like z-index problem.
Posted by: Bernhard at September 27, 2005 5:33 PM
Hey gang.
I think the move to cairo is pretty important for 1.5 given that it may be another year before Firefox 2.0 and there are SVG enabled applications to develop between now and then.
Developing cross-platform SVG applications is quite a bit more difficult if there are rendering differences. Provided there aren't too many problems left by the 1.5 release, I'd rather spend my development time working around a single set of limitations than trying to juggle multiple sets. Obviously, when I say cross-platform, I include pre-XP windows where things won't run at all without GDI+.
Also, if there are going to be fixes made by the SVG team over the 1.5.x lifetime, I'd prefer to see it spent on the common codebase rather than splitting attention over two renderers.
So if the SVG team is committed to working out the bulk of the cairo-XP kinks for 1.5 (which they appear to be working hard to do), then all the power to them. In my opinion it is the right decision for the longer term, even if it means some pain for us right now.
We're actively testing and taking the time to post new demonstrative test cases to bugzilla as we're able to narrow the problems down. I hope its helping.
Posted by: Amos at September 27, 2005 5:45 PM
There is a problem with image positioning:
http://lamp2.fh-stpoelten.ac.at/~lbz/beispiele/metasprachen/noemap/logo.svg
The y-value is 0. If the Browser width is smaller than the image there is a top margin for the image - this should not be. The bitmap is scaled with wrong center.
Posted by: Bernhard at September 27, 2005 6:40 PM
There are many similar bug reports (JP Fiset, i5mast) and I, we have the same problem.
It looks like a small bug which makes most of the rendering problems.
For me all these rendering problems (white rectangles on top of the drawing) can be solved if I minimize the browser window und than maximize it again.
The stability of firefox with cairo backend is much higher now. Using GDI+ it is easy to crash it in 3 seconds.
With cairo there was no crash till now.
(my svg application was developed using gdi+)
I would like to see a beta version without this
rendering problems and than make a real test
(without minimize,maximize trick).
My Opinion:
stability is much higher,
speed (mem + cpu) is nearly the same and will increase faster using cairo,
the rendering problems can be solved - I hope.
Using cairo is a good decision - I think.
Posted by: bernhard at September 27, 2005 8:40 PM
Like I mentioned earlier, I have a fix in-hand for the white rectangle and redraw problems, and this will be fixed for the next announced cairo build.
I'm trying to get some other things fixed as well before the next cycle of testing.
Posted by: tor at September 27, 2005 9:32 PM
I replied that fonts look different (smaller) on an SVG image on my site. And that some other tests went well.
I don’t see the reply here though, strange.
~Grauw
Posted by: Laurens Holst at September 28, 2005 12:00 AM
Geez, you'd think before ADDING possible bugs, they would FIX the existing bugs in printing (https://bugzilla.mozilla.org/show_bug.cgi?id=125824) and user interface like Bugzilla Bug 283697 Options panels are cropped (https://bugzilla.mozilla.org/show_bug.cgi?id=283697)
Posted by: got cats? at September 28, 2005 4:57 PM
tor, i think an earlier comment you mentioned that "There is still a problem with redrawing text that I'm looking at". I posted this here (http://weblogs.mozillazine.org/tor/archives/2005/09/call_for_testing_cairo100.html) and tried to do it here (http://weblogs.mozillazine.org/tor/archives/2005/09/win32_backend_renderer_revisit_1.html), though it was never accepted as a valid comment. Now I don't see your earlier comment, but I hope you're still working on (or have fixed) it. Any update?
Thanks,
Posted by: Jeff Schiller at September 28, 2005 5:54 PM
I'm a bit confused about all of this.
Why not do this stuff in the trunk so it gets some more testing?
Posted by: Martijn at September 29, 2005 10:42 PM
The fonts are totally different in cairo build, almost unreadable with font-size="10"
Using multiple opacity is hugely lowering performances with GDI+ version but is totally over killing any dynamic SVG i'm making with the cairo build.
With the cairo build, when i dynamically insert images in the document sometimes i can see the image appears in multiple steps. Never seen this with GDI+ build yet.
Perhaps i am using a wrong approach to SVG but the performances differences between GDI+ to this cairo build are really huge.
I am experimenting a great javascript fun with GDI+ version and DOM/SVG, but it's totally unusable with the cairo version
http://empire.network-ai.com/index.php
login : logtest
passe : pastest
click ALPHA, click CENTAURUS. The performances differences between the two versions are TOO huge imo.
I beg you to reconsider the backend graphics library change until performances are so dramatically differents. Thanks
Posted by: Mokhet at September 29, 2005 11:08 PM
Mokhet: I'm unable to login with indicated account.
Posted by: tor at September 29, 2005 11:33 PM
Oh god, i'm such a gimp. Forgot to activate the account :/ sorry for the mess, it is activated now
After posting here, i have added a little benchmarking, the differences between GDI+ and cairo are awefull :(
Posted by: Mokhet at September 30, 2005 1:02 AM
The branch build behaves the same on these, so this may be offtopic.
Shadows aren't translated:
http://openclipart.org/clipart//animals/crawfish2_ganson.svg
This one crashes firefox:
http://openclipart.org/clipart//people/fireman_enrique_meza_c_01.svg
Posted by: Mattias Päivärinta at October 1, 2005 5:49 AM
thanks
Posted by: free credit report at March 23, 2006 10:25 PM
The judge who put coded messages in his Da Vinci Code plagiarism trial ruling has written another...
Posted by: Ricardo Orr at December 13, 2006 12:33 AM
Develop a win32 application based on GDI calls having
• On top of the window, write a text as “My First GDI Call”
• Draw a Rectangle and a Circle with two different colors
• Use WM_PAINT, so that whenever this window is minimized or maximized, application repaints the client area.
Posted by: Talha at November 10, 2007 6:44 AM