Open Bug 1278825 Opened 8 years ago Updated 2 years ago

Don't optimize group opacity into SVG fill/stroke paint opacity if we want to handle it on the compositor thread

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

ASSIGNED
Tracking Status
firefox50 --- affected

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

(Keywords: perf)

Attachments

(3 files)

+++ This bug was initially created as a clone of Bug #1263829 +++

Spinning this off from bug 1263829 to try and implement the approach I outlined in bug 1263829 comment 13 - 15.
(see the comment added to CanOptimizeOpacity in the attached patch)
Just attaching these patches since I'm not going to have time to work on this until after the all-hands. The rough idea, which may or may not work, would be:

 * Backout part 2 from bug 1263829.

 * Apply the patch Make CanOptimizeOpacity return false if
   UsingEffectsForFrame returns true (see the comment added in
   CanOptimizeOpacity).

 * Rename CanOptimizeOpacity to CanOptimizeStaticOpacity and document
   that even if it returns true it may not be possible to optimize the
   opacity into the fill/stroke opacity if async animations are
   happening.

 * Do something like the 'pass opacity' plus 'pass opacity 2' patches,
   but instead of passing opacity use the nsDisplayOpacity::NeedsActiveLayer
   method added in bug 1263829 to pass an aOpacityIsAnimating argument
   from nsDisplaySVGPathGeometry through to nsSVGUtils::MakeFillPatternFor/
   MakeStrokePatternFor, then account for that at the same time as the
   CanOptimizeStaticOpacity checks there.
FWIW after bug 1263829 lands I think the only time that we don't create an nsDisplayOpacity when we would want to create one no animate opacity on the compositor thread is when opacity is animated on a geometry element (<path>, say) and nsSVGUtils::CanOptimizeOpacity returns true. That's not a hugely common case I expect, so this bug isn't particularly urgent.
Keywords: perf
No longer blocks: 1141468
Status: NEW → ASSIGNED
Priority: -- → P3
See Also: → 1400035
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: