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

RESOLVED FIXED in mozilla35

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

Trunk
mozilla35
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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