Closed Bug 729562 Opened 10 years ago Closed 10 years ago

Make SVG paint using an nsRenderingContext, and kill nsSVGRenderState

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file, 2 obsolete files)

To fix bug 614732 (make SVG use display lists for painting, hit-testing and invalidation) SVG needs to stop painting using an nsSVGRenderState and just use a plain nsRenderingContext. nsRenderingContext is all that the display list code knows about, and it's all that it will pass down for painting.

To be able to get rid of nsSVGRenderState, nsRenderingContext will need to be able to carry two more pieces of state for SVG. We need to know whether we're painting normally/for clip/for masking; and sometimes we need to know if we're painting to a window.
Attached patch patch (obsolete) — Splinter Review
Attachment #599632 - Flags: review?(bas.schouten)
Blocks: 614732
Bas asked me on IRC to do this by adding facilities to nsRenderingContext to allow it to support user data. This should make future Azure migration work slightly easier.
Attachment #599632 - Attachment is obsolete: true
Attachment #599750 - Flags: review?(bas.schouten)
Attachment #599632 - Flags: review?(bas.schouten)
I had to tweak things a little to get the patch to pass Try.
Attachment #599750 - Attachment is obsolete: true
Attachment #599921 - Flags: review?(bas.schouten)
Attachment #599750 - Flags: review?(bas.schouten)
Comment on attachment 599921 [details] [diff] [review]
patch, using new nsRenderingContext::SetUserData method

Review of attachment 599921 [details] [diff] [review]:
-----------------------------------------------------------------

As far as I can see this looks fine, although this code isn't my area of expertise.
Attachment #599921 - Flags: review?(bas.schouten) → review+
Thanks, Bas!

For the record, before checkin I fixed a bug in the UserData::Remove method, where it was reading too far, and possibly reading past the end of the allocated memory.
https://hg.mozilla.org/mozilla-central/rev/412c948ce100
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.