« May 2005 | Main | July 2005 »
June 15, 2005
Win32 Backend Renderer
I'm considering switching the renderer that Mozilla SVG uses on win32 to cairo from GDI+. The reasons for this:
- Less problems for the user, as they don't have to deal with downloading GDI+ if they're on an older system (pre-XP).
- Some bugs in GDI+ are unfixable (or at least, would take a lot of effort). For example the spread method for radial gradients, bug 296411.
- Consistent behavior between platforms, up to the quality of the respective cairo backends.
- Saving effort adding features for GDI+, which likely won't be used past 1.8.x. The patch for <svg:textPath>, bug 282579, is an example of this.
There is one missing chunk of functionality in the existing cairo 0.5.0 win32 backend, the ability to convert text to paths. I've implemented this and have asked the cairo people for review.
One problem we're currently seeing with cairo is incorrect blending results when compiling with Visual C 6.0 optimized and on OS-X (bug 293353).
Some timing results of cairo vs. GDI+ for Hixie's simple SVG performance tests - time in seconds:
| cairo | gdi+ | |
|---|---|---|
| test1 | 25.8 | 15.7 |
| test2 | 25.5 | 15.9 |
| test3 | 5.3 | 5.3 |
| test4 | 126.3 | 6.5 |
As you can see, the numbers aren't that bad except for test4, where cairo is about nineteen times slower than GDI+. This test renders a large number of <svg:image>s. While I haven't been able to get a profile on Win32 (any Quantify experts, please speak up), this test runs equally slow on linux and a profile there shows the majority of the time is spent here:
samples % symbol name 1996617 57.9397 PictureTransformPoint 961417 27.8993 __divdi3 474326 13.7644 miPointInRegion
PictureTranformPoint is shared code with libpixman
(called pixman_transform_point), called by the general
compositing function. Talking to the cairo people, there
have been some changes in the freedesktop.org xserver tree to speed
this up, which haven't made it back to libpixman yet.
Posted by tor at 12:04 AM | Comments (11)
June 14, 2005
2005-06-14 Update
Checkins during the past two weeks:- Bug 62485 - allow "text/ecmascript" mimetype
- Bug 296266 - feature strings need updating
- Bug 296463 - cairo update to 0.5.0
- Bug 297008 - radial gradients: fx,fy not set correctly when only cx,cy given
- Bug 297705 - correct cairo_text_extents() on win32 for general transforms
- Bug 122092 - enable building SVG support by default
- Bug 163068 - zoom and pan implementation (frontend)
- Bug 272630 - make getCTM() behave correctly
- Bug 272885 - disable element rendering if width/height=0
- Bug 280391 - SVGSVGElement.getElementById not implemented
- Bug 282579 - implement <svg:textPath>
- Bug 287035 - cairo code for compiling without int64 types bitrotted
- Bug 288042 - cairo/svg does not build on qt, xlib
- Bug 291785 - rendered text size depends on browser text-zoom value
- Bug 295850 - gradient implementation needs changes for paint servers
Posted by tor at 11:02 PM
June 1, 2005
2005-06-01 Weekly Update
Checkins during the past two and a half weeks:- Bug 267657 - clicking on link causes new window to open
- Bug 288265 - saving svg page messing up viewBox attributes
- Bug 292844 - svg being shown as display:block
- Bug 295645 - nested <svg:tspan> should be allowed
- Bug 295647 - gradients not working on single horizontal/vertical lines
- Bug 122092 - enable building SVG support by default
- Bug 163068 - zoom and pan implementation (frontend)
- Bug 267953 - allow text/ecmascript for <svg:script>
- Bug 272630 - make getCTM() behave correctly
- Bug 272885 - disable element rendering if width/height=0
- Bug 280391 - SVGSVGElement.getElementById not implemented
- Bug 287035 - cairo code for compiling without int64 types bitrotted
- Bug 288042 - cairo/svg does not build on qt, xlib
- Bug 291785 - rendered text size depends on browser text-zoom value
- Bug 295850 - gradient implementation needs changes for paint servers
- Bug 296266 - feature strings need updating
Posted by tor at 10:22 PM
Call for opinion: <foreignObject> in Firefox 1.1
In the recently released Firefox 1.1a1 there is a restricted implementation of SVG's <foreignObject> element. It can only do translations, not guaranteed "live" with respect to its contents, and behavior with respect to z-ordering and clipping is undefined.
Some people think that this rudimentary <foreignObject> should be removed for Firefox 1.1 because content written for a future full implementation of the feature will fail ungracefully on Firefox 1.1. Are any content developers out there working on content that uses the existing <foreignObject> and would be disappointed in it being removed until the next major version of Firefox after 1.1?
Posted by tor at 7:33 PM | Comments (23)
Call for opinion: text-zoom interaction with SVG
Currently the browser text-zoom value causes a corresponding increase/decrease in the size of SVG text. We have a patch that would change that behavior (bug 291785), but there is a thought that for consistency all fonts on the page should change with text-zoom. In the future when text-zoom is replaced with page-zoom, the SVG area will be also increased proportionally in size.
Posted by tor at 7:19 PM | Comments (25)