From 48c7caadd23b1905c7c95f5be64975ef417fed16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 28 Nov 2023 22:14:07 +0100 Subject: [PATCH] monitor-manager: Remove is_transform_handled() There was one user, but it got changed to bypass the monitor manager and talk directly to MetaCrtcNative. Part-of: --- src/backends/meta-monitor-manager.c | 11 ----------- src/backends/native/meta-monitor-manager-native.c | 11 ----------- src/backends/native/meta-renderer-native.c | 5 ++--- src/backends/x11/meta-monitor-manager-xrandr.c | 12 ------------ 4 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index eac51ad1d..e4304b30d 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -3632,17 +3632,6 @@ meta_monitor_manager_tiled_monitor_removed (MetaMonitorManager *manager, manager_class->tiled_monitor_removed (manager, monitor); } -gboolean -meta_monitor_manager_is_transform_handled (MetaMonitorManager *manager, - MetaCrtc *crtc, - MetaMonitorTransform transform) -{ - MetaMonitorManagerClass *manager_class = - META_MONITOR_MANAGER_GET_CLASS (manager); - - return manager_class->is_transform_handled (manager, crtc, transform); -} - static void meta_monitor_manager_real_read_current_state (MetaMonitorManager *manager) { diff --git a/src/backends/native/meta-monitor-manager-native.c b/src/backends/native/meta-monitor-manager-native.c index 44600be57..76a45eedd 100644 --- a/src/backends/native/meta-monitor-manager-native.c +++ b/src/backends/native/meta-monitor-manager-native.c @@ -437,15 +437,6 @@ meta_monitor_manager_native_resume (MetaMonitorManagerNative *manager_native) meta_monitor_manager_native_connect_hotplug_handler (manager_native); } -static gboolean -meta_monitor_manager_native_is_transform_handled (MetaMonitorManager *manager, - MetaCrtc *crtc, - MetaMonitorTransform transform) -{ - return meta_crtc_native_is_transform_handled (META_CRTC_NATIVE (crtc), - transform); -} - static MetaMonitorScalesConstraint get_monitor_scale_constraints_from_layout_mode (MetaLogicalMonitorLayoutMode layout_mode) { @@ -717,8 +708,6 @@ meta_monitor_manager_native_class_init (MetaMonitorManagerNativeClass *klass) meta_monitor_manager_native_apply_monitors_config; manager_class->set_power_save_mode = meta_monitor_manager_native_set_power_save_mode; - manager_class->is_transform_handled = - meta_monitor_manager_native_is_transform_handled; manager_class->calculate_monitor_mode_scale = meta_monitor_manager_native_calculate_monitor_mode_scale; manager_class->calculate_supported_scales = diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index 7494563ca..87b442eab 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -1279,9 +1279,8 @@ calculate_view_transform (MetaMonitorManager *monitor_manager, crtc_transform = meta_output_logical_to_crtc_transform (output, logical_monitor->transform); - if (meta_monitor_manager_is_transform_handled (monitor_manager, - crtc, - crtc_transform)) + if (meta_crtc_native_is_transform_handled (META_CRTC_NATIVE (crtc), + crtc_transform)) return META_MONITOR_TRANSFORM_NORMAL; else return crtc_transform; diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c index 404faf189..144af7184 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.c +++ b/src/backends/x11/meta-monitor-manager-xrandr.c @@ -832,17 +832,6 @@ meta_monitor_manager_xrandr_init_monitors (MetaMonitorManagerXrandr *manager_xra XRRFreeMonitors (m); } -static gboolean -meta_monitor_manager_xrandr_is_transform_handled (MetaMonitorManager *manager, - MetaCrtc *crtc, - MetaMonitorTransform transform) -{ - g_warn_if_fail ((meta_crtc_get_all_transforms (crtc) & transform) == - transform); - - return TRUE; -} - static float meta_monitor_manager_xrandr_calculate_monitor_mode_scale (MetaMonitorManager *manager, MetaLogicalMonitorLayoutMode layout_mode, @@ -980,7 +969,6 @@ meta_monitor_manager_xrandr_class_init (MetaMonitorManagerXrandrClass *klass) manager_class->change_backlight = meta_monitor_manager_xrandr_change_backlight; manager_class->tiled_monitor_added = meta_monitor_manager_xrandr_tiled_monitor_added; manager_class->tiled_monitor_removed = meta_monitor_manager_xrandr_tiled_monitor_removed; - manager_class->is_transform_handled = meta_monitor_manager_xrandr_is_transform_handled; manager_class->calculate_monitor_mode_scale = meta_monitor_manager_xrandr_calculate_monitor_mode_scale; manager_class->calculate_supported_scales = meta_monitor_manager_xrandr_calculate_supported_scales; manager_class->get_capabilities = meta_monitor_manager_xrandr_get_capabilities;