Make SVG paint using an nsRenderingContext, and kill nsSVGRenderState

RESOLVED FIXED in mozilla13

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

Trunk
mozilla13
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Assignee

Description

7 years ago
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.
Assignee

Comment 1

7 years ago
Posted patch patch (obsolete) — Splinter Review
Attachment #599632 - Flags: review?(bas.schouten)
Assignee

Updated

7 years ago
Blocks: 614732
Assignee

Comment 2

7 years ago
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)
Assignee

Comment 3

7 years ago
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+
Assignee

Comment 5

7 years ago
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: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.