There were a few things that I left out of my previous post about Cairo status (as a few people pointed out), and I wanted to highlight them here.
For the past two months, Antoine Azar and Frédéric Plourde have been working for Mozilla, cranking away at both Cairo and pixman. They started out with a completely unfamiliar codebase and quickly producing useful enhancements. Antoine was able to implement some missing support in pixman, allowing us to implement smooth scaling of images. This was the final missing piece that makes Firefox 3's full-page zoom feature able to display a high quality version of the unscaled page.
Johnathan sent me some screenshots from Vista, comparing the rendering of a recent Firefox 3 beta to IE 8's beta. He's running in Vista's high-DPI mode, so all the scaling was applied by default. Firefox is on the left, IE's on the right... the difference is pretty striking (click for the full image, make sure you view it unscaled for all the gory details):
Linux users will have to wait a little longer to get higher quality image scaling; as we now rely on the X server to do image compositing through the Render extension, we'll have to wait until the pixman patches are integrated into the X server. I'm hoping that will happen in time for the next X.org release.
Frédéric has also been working with pixman, specifically low-level optimization of the compositing routines (pixman is used on Windows for all non-trivial rendering, and used indirectly on Linux through the X server). He cleaned up the existing MMX code so that it could build with Visual C++, and is now working on further optimization and extending the existing fast paths. In Mozilla, we've enabled the MMX code everywhere.
At around the same time, a rapidly-progressing effort to add SSE2-optimized paths to pixman began on the Cairo mailing list, and Frederic will be joining those guys shortly. Given that most x86 computers in the past few years have full SSE2 support, it makes sense to focus work there. Early results are showing significant peformance gains, which should be a huge boon for authors taking advantage of SVG and Canvas features. Much of this additional work will not ship with Firefox 3 at release time, but it may come shortly after in a minor release. I'm pretty excited to have additional improvements already waiting in the wings... I think you'll see Gecko continuing the past few months' trend of rapid development even after Firefox 3's release.
14 Comments to “A Little More Cairo, Just For You”
- 1 Pingback on Mar 18th, 2008 at 5:59 pm


Looks great. Will SSE2 optimized builds function on non SSE2 CPUs?
Also, what’s the timeline for enabling Glitz :)
Will Cairo take advantage of Core 2’s instruction sets, 65nm Conroe’s SSSE3 or 45nm Penryn’s SSE4.1 for faster rendering speeds?
Speaking of performance, are there any comparisons of rendering speed for IE 7/8 and Mozilla 2/3? Clean image scaling and pretty pictures are tantalizing, but can turn sour if it takes too long,
Have you guys looks at LLVM ( llvm.org ) for SSE2 ad related things? LLVM is a “processor independent assember” that’s converted into the best native assembler (SSE etc) at runtime. It’s for example used in Apple’s software OpenGL renderer.
I find that pictures look jaggy when I zoom out four or five steps from default zoom. That should be easier to deal with than zooming in, shouldn’t it?
This is a really interesting news! Hovewer i don’t think will be a so much high speed difference between sse2 and sse3/sse4, probably can be more useful the rendering using full multicore technology
I noticed the difference as soon as I installed beta 4! :). It’s a really nice improvement, glad you were able to get it in before the release.
But Firefox now also respects the DPI setting? I didn’t know that, I thought it was my increased default font sizes that did it, that’s a great new feature! (speaking as a 120dpi display user too :)).
Hm, well, I tried looking at other sites, also installed the latest nightly… Maybe it’s me, but my higher DPI settings don’t seem to affect Firefox’s zoom. Scaling doesn’t get applied by default in Firefox.
IE renders an MS page and what’s at the bottom left? “Done, but with errors on page.”
I don’t know about this. Both screen shots look like garbage, with pieces of letters missing and vertical lines narrowed. I am running a Dell ultrasharp LCD at native resolution, 1280×1024.
On second thought, I was commenting on text. The part that I’m certain is graphics does look much better on the Firefox side. And I discovered also that the whole (graphics) screenshot–especially the main text–looks a lot better on a CRT than on an LCD. Go firgure. So I guess I’m not so sure I can tell how it looks. Fortunately, I don’t need to. Good work — I think. :)
VanillaMozilla: you are probably looking at a scale version of both images. Hit the green arrow icon at the bottom to see them unscaled. Then the difference should be obvious.
Cool. I’d like to get a subscription to your blog, but was too stupid to see, where/how?
Making Cairo work well with OS X – and taking full advantage of it – is close to my mind (would be too nerdy to say ‘heart’?). Unfortunately, it seems rather difficult to even find a working 1.6.4 based XCode/Aqua GUI sample to begin with.
Can you lead to any?