Closed Bug 876157 Opened 12 years ago Closed 12 years ago

Avoid expensive nsSVGGradientFrame::GetGradientTransform calls when gradients paint only a single color

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

(Keywords: perf)

Attachments

(1 file)

In bug 780762 I'm seeing nsSVGGradientFrame::GetGradientTransform being hit for 6% of the samples, which is stupid given that all the gradients in that bug's testcase only paint a single color. The reason the call is so expensive is because it needs to call GetBBox since the gradients use the (default) value of "objectBoundingBox" for the "gradientUnits" attribute. We should avoid expensive nsSVGGradientFrame::GetGradientTransform calls when gradients paint only a single color.
Attached patch patchSplinter Review
Attachment #754146 - Flags: review?(roc)
Blocks: 780762
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: