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

RESOLVED FIXED in mozilla24

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

({perf})

Trunk
mozilla24
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

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

Comment 1

6 years ago
Created attachment 754146 [details] [diff] [review]
patch
Attachment #754146 - Flags: review?(roc)
(Assignee)

Updated

6 years ago
Blocks: 780762
https://hg.mozilla.org/mozilla-central/rev/3d89699c69bb
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.