Closed Bug 1637437 Opened 4 months ago Closed 4 months ago

Recompute Backdrop-Filters Enabled State Whenever UseWebRender is Modified

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: nordzilla, Assigned: nordzilla)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

[1635584] added logic to recompute backdrop-filter's enabled state in some places where UseWebRender is set.

This is not good for several reasons:

  1. These functions are tightly coupled together and should really exist within the same function call.

  2. It would be easy to accidentally miss a place where one is called, but not the other.

  3. Anyone adding a new call to SetUseWebRender() would have to magically know to recompute backdrop-filter's state.

  4. Adding a call to RecomputeBackdropFilterEnabledState() after every use of SetUseWebRender() would be wasteful, because we really only want to recompute if the value changed.

Having this functionality separated just feels like a defect waiting to happen (if you don't already consider it a defect itself).

This patch modifies the macros that generate the gfxVars such that SetUseWebRender can have a custom setter that only recomputes backdrop-filter's state if its UseWebRender's value changes.

  • Modify the gfxVars generation macros to allow custom setters.
    • Remove previous manual calls to recompute backdrop filter.
Attachment #9147797 - Attachment description: Bug 1637437 - Recompute backdrop-filter only when WebRender Changes → Bug 1637437 - Recompute backdrop-filter only when WebRender changes r=jrmuizel,emilio
Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/090e5dcb0308
Recompute backdrop-filter only when WebRender changes r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.