[mutter/gnome-3-24] monitor: Move tiled CRTC mode identification into helper
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-24] monitor: Move tiled CRTC mode identification into helper
- Date: Fri, 12 May 2017 03:57:25 +0000 (UTC)
commit a6678a262c3a4a7530f6198cace6a38a3183efb3
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Apr 28 15:36:51 2017 +0800
monitor: Move tiled CRTC mode identification into helper
It'll be used in more places later.
https://bugzilla.gnome.org/show_bug.cgi?id=781723
src/backends/meta-monitor.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index 47729a8..299fef6 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -523,6 +523,14 @@ is_monitor_mode_assigned (MetaMonitor *monitor,
return TRUE;
}
+static gboolean
+is_crtc_mode_tiled (MetaOutput *output,
+ MetaCrtcMode *crtc_mode)
+{
+ return (crtc_mode->width == (int) output->tile_info.tile_w &&
+ crtc_mode->height == (int) output->tile_info.tile_h);
+}
+
static MetaMonitorMode *
create_tiled_monitor_mode (MetaMonitorTiled *monitor_tiled)
{
@@ -577,12 +585,7 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
GList *l;
int i;
- /*
- * Assume modes with a resolution identical to the tile sizes are tiled
- * modes.
- */
- if (crtc_mode->width == (int) main_output->tile_info.tile_w &&
- crtc_mode->height == (int) main_output->tile_info.tile_h)
+ if (is_crtc_mode_tiled (main_output, crtc_mode))
return NULL;
mode = g_new0 (MetaMonitorMode, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]