Closed Bug 1305636 Opened 9 years ago Closed 9 years ago

Opacity in nsSVGUtils::PaintFrameWithEffects is applied twice.

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: u459114, Assigned: u459114)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Create this bug to trace fixing of bug 1304991 comment 10. In nsSVGUtils::PaintFrameWithEffects, aOpacity is applied twice, once in nsSVGMaskFrame::GetMaskForMaskedFrame, and onece in gfxContext::PushGroupForBlendBack. Fix this problem here and create some test case at the same time.
Blocks: 1305637
Attachment #8795261 - Flags: review?(mstange)
Attachment #8795262 - Flags: review?(mstange)
Comment on attachment 8795261 [details] Bug 1305636 - Part 1. In nsSVGUtils::PaintFrameWithEffects, do not pass opacity to GetMaskForMaskedFrame. https://reviewboard.mozilla.org/r/81374/#review80016
Attachment #8795261 - Flags: review?(mstange) → review+
Attachment #8795262 - Flags: review?(mstange) → review+
Hmm, I'm somewhat regretting my r+s here and in bug 1304991 now... The reason we applied the opacity to the mask surface was that it made things faster. Since bug 1210560, we were applying opacity both the fast way and the slow way. And now we're removing the fast way. Shouldn't we instead try to remove the slow way instead? Or is the fast way not actually that much faster than the slow way?
(In reply to Markus Stange [:mstange] from comment #7) > Hmm, I'm somewhat regretting my r+s here and in bug 1304991 now... > The reason we applied the opacity to the mask surface was that it made > things faster. Since bug 1210560, we were applying opacity both the fast way > and the slow way. And now we're removing the fast way. Shouldn't we instead > try to remove the slow way instead? Or is the fast way not actually that > much faster than the slow way? OK, change should be minor. May I know why you think apply opacity in mask surface is faster? Is that because the size of mask surface is smaller?
Flags: needinfo?(mstange)
(In reply to C.J. Ku[:cjku](UTC+8) from comment #8) > May I know why you think apply opacity in mask surface is faster? Is that > because the size of mask surface is smaller? It probably depends on the Moz2D backend. It would be nice to measure the difference. The ideas is that we have optimized paths for applying the opacity during the RGB->luminance conversion (so we only need to look at the data once), but we might not have optimized paths for applying the opacity at the same time as applying the mask (so we may need to loop over the pixels twice).
Flags: needinfo?(mstange)
(In reply to Markus Stange [:mstange] from comment #9) > (In reply to C.J. Ku[:cjku](UTC+8) from comment #8) > > May I know why you think apply opacity in mask surface is faster? Is that > > because the size of mask surface is smaller? > > It probably depends on the Moz2D backend. It would be nice to measure the > difference. The ideas is that we have optimized paths for applying the > opacity during the RGB->luminance conversion (so we only need to look at the Hmm.. such as ComputesRGBLuminanceMask_NEON I see. > data once), but we might not have optimized paths for applying the opacity > at the same time as applying the mask (so we may need to loop over the > pixels twice).
Attachment #8795422 - Flags: review?(mstange)
Attachment #8795422 - Flags: review?(mstange) → review+
Blocks: mask-ship, mask-image
No longer blocks: 1305637
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: