|
|
776610 |
From 91c5c94434b22895f97b3ae47a889ccb902b86aa Mon Sep 17 00:00:00 2001
|
|
|
776610 |
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
|
776610 |
Date: Mon, 23 Jul 2018 21:36:57 +0200
|
|
|
776610 |
Subject: [PATCH] renderer/native: Check calculated transform when creating
|
|
|
776610 |
view
|
|
|
776610 |
|
|
|
776610 |
The "backends: Move MetaOutput::crtc field into private struct"
|
|
|
776610 |
accidentally changed the view transform calculation code to assume that
|
|
|
776610 |
"MetaCrtc::transform" corresponds to the transform of the CRTC; so is
|
|
|
776610 |
not the case yet; one must calculate the transform from the logical
|
|
|
776610 |
monitor, and check whether it is supported by the CRTC using
|
|
|
776610 |
meta_monitor_manager_is_transform_handled(). This commit restores the
|
|
|
776610 |
old behaviour that doesn't use MetaCrtc::transform when calculating the
|
|
|
776610 |
view transform.
|
|
|
776610 |
|
|
|
776610 |
Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/216
|
|
|
776610 |
---
|
|
|
776610 |
src/backends/native/meta-renderer-native.c | 9 +++++++--
|
|
|
776610 |
src/backends/x11/nested/meta-renderer-x11-nested.c | 8 ++++++--
|
|
|
776610 |
2 files changed, 13 insertions(+), 4 deletions(-)
|
|
|
776610 |
|
|
|
776610 |
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
|
|
776610 |
index fc6b223026..8dc0da7104 100644
|
|
|
776610 |
--- a/src/backends/native/meta-renderer-native.c
|
|
|
776610 |
+++ b/src/backends/native/meta-renderer-native.c
|
|
|
776610 |
@@ -2720,9 +2720,14 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
|
|
776610 |
MetaMonitor *main_monitor;
|
|
|
776610 |
MetaOutput *main_output;
|
|
|
776610 |
MetaCrtc *crtc;
|
|
|
776610 |
+ MetaMonitorTransform crtc_transform;
|
|
|
776610 |
+
|
|
|
776610 |
main_monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
|
|
|
776610 |
main_output = meta_monitor_get_main_output (main_monitor);
|
|
|
776610 |
crtc = meta_output_get_assigned_crtc (main_output);
|
|
|
776610 |
+ crtc_transform =
|
|
|
776610 |
+ meta_monitor_logical_to_crtc_transform (main_monitor,
|
|
|
776610 |
+ logical_monitor->transform);
|
|
|
776610 |
|
|
|
776610 |
/*
|
|
|
776610 |
* Pick any monitor and output and check; all CRTCs of a logical monitor will
|
|
|
776610 |
@@ -2731,10 +2736,10 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
|
|
776610 |
|
|
|
776610 |
if (meta_monitor_manager_is_transform_handled (monitor_manager,
|
|
|
776610 |
crtc,
|
|
|
776610 |
- crtc->transform))
|
|
|
776610 |
+ crtc_transform))
|
|
|
776610 |
return META_MONITOR_TRANSFORM_NORMAL;
|
|
|
776610 |
else
|
|
|
776610 |
- return crtc->transform;
|
|
|
776610 |
+ return crtc_transform;
|
|
|
776610 |
}
|
|
|
776610 |
|
|
|
776610 |
static MetaRendererView *
|
|
|
776610 |
diff --git a/src/backends/x11/nested/meta-renderer-x11-nested.c b/src/backends/x11/nested/meta-renderer-x11-nested.c
|
|
|
776610 |
index 8fdf46b0b5..b29b9c69e2 100644
|
|
|
776610 |
--- a/src/backends/x11/nested/meta-renderer-x11-nested.c
|
|
|
776610 |
+++ b/src/backends/x11/nested/meta-renderer-x11-nested.c
|
|
|
776610 |
@@ -51,10 +51,14 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
|
|
776610 |
MetaMonitor *main_monitor;
|
|
|
776610 |
MetaOutput *main_output;
|
|
|
776610 |
MetaCrtc *crtc;
|
|
|
776610 |
+ MetaMonitorTransform crtc_transform;
|
|
|
776610 |
|
|
|
776610 |
main_monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
|
|
|
776610 |
main_output = meta_monitor_get_main_output (main_monitor);
|
|
|
776610 |
crtc = meta_output_get_assigned_crtc (main_output);
|
|
|
776610 |
+ crtc_transform =
|
|
|
776610 |
+ meta_monitor_logical_to_crtc_transform (main_monitor,
|
|
|
776610 |
+ logical_monitor->transform);
|
|
|
776610 |
/*
|
|
|
776610 |
* Pick any monitor and output and check; all CRTCs of a logical monitor will
|
|
|
776610 |
* always have the same transform assigned to them.
|
|
|
776610 |
@@ -62,10 +66,10 @@ calculate_view_transform (MetaMonitorManager *monitor_manager,
|
|
|
776610 |
|
|
|
776610 |
if (meta_monitor_manager_is_transform_handled (monitor_manager,
|
|
|
776610 |
crtc,
|
|
|
776610 |
- crtc->transform))
|
|
|
776610 |
+ crtc_transform))
|
|
|
776610 |
return META_MONITOR_TRANSFORM_NORMAL;
|
|
|
776610 |
else
|
|
|
776610 |
- return crtc->transform;
|
|
|
776610 |
+ return crtc_transform;
|
|
|
776610 |
}
|
|
|
776610 |
|
|
|
776610 |
static MetaRendererView *
|
|
|
776610 |
--
|
|
|
776610 |
2.17.1
|
|
|
776610 |
|