Closed
Bug 610122
Opened 14 years ago
Closed 14 years ago
Speed up mask drawing for SVG elements
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
People
(Reporter: mstange, Assigned: mstange)
References
Details
(Keywords: perf)
Attachments
(2 files, 1 obsolete file)
3.20 KB,
patch
|
roc
:
approval2.0+
|
Details | Diff | Splinter Review |
1.32 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #586954 +++ The patch I landed in bug 586954 improves performance for non-SVG elements that have SVG masks applied to them. This bug is about speeding up the SVG case. The "part 1" patch in bug 586954, which I didn't land because of unexplained test failures, will help both the non-SVG and the SVG case, so I'll re-attach it here. When we've got those failures sorted out, the remaining piece to optimize is the PushGroup call in nsSVGUtils::PaintFrameWithEffects.
Assignee | ||
Comment 1•14 years ago
|
||
This caused reftest failures, log is in attachment 487860 [details].
Comment 3•14 years ago
|
||
Testing on Mac, the RoundOut call doesn't seem to make a difference. (The maskArea in each of the failing tests have integral x/y/width/height to start with.)
Comment 4•14 years ago
|
||
Also note from the log in bug 586954 that the differing pixels are scattered randomly throughout the interior of the failing rect - it's not a periphery thing.
Comment 5•14 years ago
|
||
For which you need dbaron's reftest-analyzer.xhtml to see; I have a copy online at http://jwatt.org/tools/reftest-analyzer.xhtml
Comment 6•14 years ago
|
||
(FWIW, there's also always a reftest-analyzer instance available here: http://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml )
Updated•14 years ago
|
Attachment #492192 -
Attachment description: better? → no better
Attachment #492192 -
Attachment is obsolete: true
Assignee | ||
Comment 9•14 years ago
|
||
I think I know what's going on: We're hitting differences between cairo's quartz and image backends. In those reftests, the test uses a mask, but the reference doesn't. The reference renders the circle and the gradient directly into the target surface. Before the patch, on Mac everything in those tests was rendered using the Quartz backend. But now that we're rendering the mask into a cairo image surface, this is done using the image backend, where anti-aliasing and gradient rasterization seem to be slightly different. If we make the reftest reference use a mask, too, the tests pass on Mac. Then both the test and the reference render the circle and the gradient using cairo's image backend.
Attachment #492325 -
Flags: review?(roc)
Assignee | ||
Updated•14 years ago
|
Attachment #488657 -
Attachment is obsolete: true
Assignee | ||
Comment 10•14 years ago
|
||
Comment on attachment 492192 [details] [diff] [review] speed up nsSVGMaskFrame::ComputeMaskAlpha and round out maskArea I think rounding out the clip rect is a good idea either way.
Attachment #492192 -
Attachment description: no better → speed up nsSVGMaskFrame::ComputeMaskAlpha and round out maskArea
Attachment #492192 -
Attachment is obsolete: false
Updated•14 years ago
|
Assignee: nobody → mstange
Attachment #492325 -
Flags: review?(roc) → review+
Comment on attachment 492192 [details] [diff] [review] speed up nsSVGMaskFrame::ComputeMaskAlpha and round out maskArea Let's do this!
Attachment #492192 -
Flags: approval2.0+
Assignee | ||
Comment 12•14 years ago
|
||
Reftests passed on all platforms in a tryserver push with the two patches.
Keywords: checkin-needed
Whiteboard: [can land]
Assignee | ||
Comment 13•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/ac9517000604 http://hg.mozilla.org/mozilla-central/rev/ef00cc458294
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [can land]
Target Milestone: --- → mozilla2.0b8
You need to log in
before you can comment on or make changes to this bug.
Description
•