Open Bug 1759232 Opened 3 years ago Updated 7 months ago

Use per-monitor vsync on macOS (and stop using CVDisplayLinkCreateWithActiveCGDisplays)

Categories

(Core :: Widget: Cocoa, task, P1)

All
macOS
task

Tracking

()

People

(Reporter: mstange, Unassigned)

References

(Depends on 1 open bug, Blocks 5 open bugs)

Details

Firefox triggers its rendering from vsync notifications. On macOS, we have one system-wide vsync source, which is accurate for the "main" screen. If you have multiple monitors with different refresh rates, and your Firefox window is not on the main screen, then those vsync notifications happen at the wrong time.

For example, if you have a Macbook Pro with a ProMotion display (capable of 120Hz) and an external monitor capable of 60Hz, we use either 120Hz or 60Hz across all screens, depending on which screen is the "main" screen. So you might get 60Hz animations on your 120Hz monitor, or unnecessarily frequent rendering on your 60Hz monitor.

Furthermore, the API we're using at the moment (CVDisplayLinkCreateWithActiveCGDisplays) has caused us lots of trouble in the past and is continuing to do so, see these bugs for a subset of the problems: bug 1422855, bug 1682713, bug 1735408, bug 1602842, bug 1749431.

In this bug I want to implement per-monitor vsync for macOS, so that we can stop calling CVDisplayLinkCreateWithActiveCGDisplays.

Depends on: 1759234
Severity: -- → S2
Priority: -- → P1
Depends on: 1759581
Depends on: 1765399
Depends on: 1769139

Probably not a S2
Reminder, S2 means: (Serious) Major functionality/product severely impaired or a high impact issue and a satisfactory workaround does not exist

Severity: S2 → S3
Duplicate of this bug: 1793639

Unassigning myself because I ended up working on profiler things instead. I'd be happy for someone else to pick up this work, it is still needed.

Assignee: mstange.moz → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.