Closed Bug 1074594 Opened 8 years ago Closed 8 years ago

Stop inverting the transform in nsSVGUtils::GetStrokeTransform, give it a more performant signature, and a better name

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file)

nsSVGUtils::GetStrokeTransform is causing be problems because it inverts the transform before returning it and some callers (pre-existing, and ones I'm adding) have to invert it back again. This is causing some irritating rounding errors and causing unnecessary matrix multiplication. I want to change it so that it doesn't do the Invert() call, and callers who require inversion do that.

While here this function can be given a better signature and a better name. Also I want to rename the variables in the callers that accept the returned result to say what the transform is, not just some "stroke transform" name which makes it hard to reason about what is going on.
Attached patch patchSplinter Review
Attachment #8497231 - Flags: review?(longsonr)
Attachment #8497231 - Flags: review?(longsonr) → review+
https://hg.mozilla.org/mozilla-central/rev/9647b50b12af
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.