macos: use display id when creating CVDisplayLink
authorChristian Hergert <christian@hergert.me>
Fri, 25 Feb 2022 21:09:31 +0000 (13:09 -0800)
committerChristian Hergert <chergert@redhat.com>
Wed, 16 Mar 2022 19:24:11 +0000 (12:24 -0700)
commit9767b3a97eed093380d95dcd1152899c74a7f40f
tree94d958a1fd9a3b01c9eaf6c9336bd8323c75103a
parent676e9ab127902a2b7c3fd85c07b638f4429f8223
macos: use display id when creating CVDisplayLink

Currently we're using a display link that is for all active displays which
is just the display server trying to find some timings that try to overlap
as many as possible.

That was fine for a prototype, but we really need to do better for
situations with mixed frame rate (such as 60hz and 120hz promotion
displays). Additionally, the 144hz external monitor I have will never
reach 144hz using the current design.

This is just the first step in changing this, but the goal is to have
one of these attached to each GdkMacosMonitor which we can then use to
thaw surfaces specific to that monitor.
gdk/macos/gdkdisplaylinksource.c
gdk/macos/gdkdisplaylinksource.h
gdk/macos/gdkmacosdisplay.c