Closed
Bug 435356
Opened 16 years ago
Closed 13 years ago
Stop using nsIDOMSVGMatrix internally
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: jwatt)
References
Details
(Keywords: arch)
Attachments
(3 files, 3 obsolete files)
90.02 KB,
patch
|
Details | Diff | Splinter Review | |
194.18 KB,
patch
|
Details | Diff | Splinter Review | |
108.56 KB,
patch
|
Details | Diff | Splinter Review |
Right now SVG uses XPCOM for some basic internal types like rect and matrix. We have deCOM versions of these types with pretty decent APIS. Cleaning this up would shrink the code, make it more readable, and probably improve performance.
Reporter | ||
Updated•16 years ago
|
Whiteboard: [good first bug]
Comment 1•16 years ago
|
||
This patch converts many uses of nsIDOMSVGMatrix to gfxMatrix. It's work in progress and likely won't build. Just want to make sure I'm heading the right direction.
Reporter | ||
Comment 2•16 years ago
|
||
Basically looks great. Use const gfxMatrix& instead of const gfxMatrix*. GetTMIncludingOffset should just return the matrix. Wherever 'null' means 'identity', don't bother with validity bits, just return the matrix. I assume you're going to rename the *Thebes() functions to their base names at some point.
Reporter | ||
Comment 3•16 years ago
|
||
One thing I just realized is that gfxMatrix and gfxRect use doubles internally whereas SVG currently uses floats. For storage in frames and elements, we probably should use floats to save memory. The best way to do this might be to have nsSVGPackedMatrix and nsSVGPackedRect classes that store floats internally, have constructors that take a gfxMatrix/gfxRect, and have an Unpack method that returns a gfxMatrix/gfxRect.
Reporter | ||
Comment 4•16 years ago
|
||
Those classes would only be used in fields of data structures that hang around --- primarily frames and elements.
Reporter | ||
Comment 5•16 years ago
|
||
Craig, I don't know if you're still working on this, but can you post your latest patch here so if you can't carry it on, someone else can build on your work?
Comment 6•16 years ago
|
||
I have cleaned up Craigs patch to make it compile and also included a few suggestions from comment #2. Unfortunately the patch fails 4 svg reftests and I don't have the slightest idea why that is. Getting the hang of this XPCOM outparam business is quite hard. Also I'm not sure if I have enough time to work on this bug right now, I'm kind of occupied with exams.
Assignee: nobody → arpad.borsos
Attachment #327065 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Comment 7•16 years ago
|
||
Here are the changes that have been sitting in my tree. It should be more complete than the original patch I submitted.
Comment 8•16 years ago
|
||
I seem to be having a problem getting the reftests to run without crashing the browser completely so I'm not sure of the health of the patch I just posted.
Comment 9•16 years ago
|
||
Assigning back to Craig. Nice to see you back. Hope you can also integrate some of my changes, like getting rid of the outparam in GetViewboxToViewportTransform.
Assignee: arpad.borsos → craig.topper
Reporter | ||
Updated•15 years ago
|
Assignee: craig.topper → nobody
Comment 10•15 years ago
|
||
I'll take this.
Reporter | ||
Comment 11•15 years ago
|
||
See bug 488314 which converts GetCanvasTM to return gfxMatrix.
Depends on: 488314
Comment 12•15 years ago
|
||
(In reply to comment #11) > See bug 488314 which converts GetCanvasTM to return gfxMatrix. I see.
Assignee | ||
Comment 13•15 years ago
|
||
I cleaned up our internal usage of nsIDOMSVGRect and nsSVGRect in bug 495938, so we now only use gfxRect (there was never anything for rect in patches on this bug BTW).
Summary: Convert SVG internal usage of nsIDOMSVGMatrix and nsIDOMSVGRect to gfxMatrix/gfxRect → Stop using nsIDOMSVGMatrix internally
Comment 14•15 years ago
|
||
The mentioned bug is now commited and fixed. So, is it time to work on this? Can you assign this to me? Or should I still wait for Bug 488314? Well, I've almost forgot what this bug is for. Sorry for being lazy.
Assignee | ||
Comment 15•15 years ago
|
||
Hi Ryo. You're not being lazy at all. Your patches on other bugs have been great. :-) For this bug though we have a deadline of the end of this month, so I'd rather take this one and work on it myself. Sorry for not marking it as so before, and thanks for your offer to work on it.
Assignee: nobody → jwatt
Comment 16•15 years ago
|
||
I see. :)
Assignee | ||
Comment 17•15 years ago
|
||
I've dug myself into a bit of a hole. This patch is not easy to split up into smaller patches, and somehow I've managed to breaks filters. Nevertheless, up for review since it's pretty much there, and hopefully the filter fix is fairly small and easy to review afterwards.
Attachment #387738 -
Flags: review?(longsonr)
Assignee | ||
Comment 18•15 years ago
|
||
Patch updated to tip and now passing SVG reftests and mochitests.
Attachment #387738 -
Attachment is obsolete: true
Attachment #387970 -
Flags: review?(longsonr)
Attachment #387738 -
Flags: review?(longsonr)
Updated•15 years ago
|
Attachment #387970 -
Flags: review?(longsonr) → review+
Updated•15 years ago
|
Whiteboard: [good first bug]
Assignee | ||
Comment 19•15 years ago
|
||
Comment on attachment 387970 [details] [diff] [review] patch removing stack instances Pushed http://hg.mozilla.org/mozilla-central/rev/941a73f2fc21
Attachment #387970 -
Attachment description: patch → [checked in] patch removing stack instances
Assignee | ||
Comment 20•15 years ago
|
||
Comment on attachment 387970 [details] [diff] [review] patch removing stack instances Backed out due to nsSVGMatrix and nsTArray_base leaks. E.g. see http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248209054.1248213673.22667.gz
Attachment #387970 -
Attachment description: [checked in] patch removing stack instances → patch removing stack instances
Assignee | ||
Comment 21•15 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/684dadc0726e
Attachment #387970 -
Attachment is obsolete: true
Comment 22•13 years ago
|
||
bug 602759 removed what was left.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•