[gtk/wip/chergert/quartz4u] macos: include refresh rate for use by display/monitor
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/quartz4u] macos: include refresh rate for use by display/monitor
- Date: Thu, 14 May 2020 22:14:06 +0000 (UTC)
commit bf9cadda3808f2e9aa2704f0e9a51a3ab364dc94
Author: Christian Hergert <chergert redhat com>
Date: Thu May 14 15:12:49 2020 -0700
macos: include refresh rate for use by display/monitor
gdk/macos/gdkdisplaylinksource.c | 1 +
gdk/macos/gdkdisplaylinksource.h | 1 +
2 files changed, 2 insertions(+)
---
diff --git a/gdk/macos/gdkdisplaylinksource.c b/gdk/macos/gdkdisplaylinksource.c
index 2961042724..7840a362fb 100644
--- a/gdk/macos/gdkdisplaylinksource.c
+++ b/gdk/macos/gdkdisplaylinksource.c
@@ -188,6 +188,7 @@ gdk_display_link_source_new (void)
if (period == 0.0)
period = 1.0 / 60.0;
impl->refresh_interval = period * 1000000L;
+ impl->refresh_rate = 1.0 / period * 1000L;
/*
* Wire up our callback to be executed within the high-priority thread.
diff --git a/gdk/macos/gdkdisplaylinksource.h b/gdk/macos/gdkdisplaylinksource.h
index 7493b0c0d4..ed769b59f8 100644
--- a/gdk/macos/gdkdisplaylinksource.h
+++ b/gdk/macos/gdkdisplaylinksource.h
@@ -34,6 +34,7 @@ typedef struct
CVDisplayLinkRef display_link;
gint64 refresh_interval;
+ guint refresh_rate;
volatile gint64 presentation_time;
volatile guint needs_dispatch;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]