Remove meta_is_stage_views_enabled()
This is an old relic from when ClutterStageView was being added, and tests were somewhat prepared to be able to test the "X11 style" of things, with the nested backend some how managing to emulate that. Lets drop that stuff, it isn't used by the test suite, and isn't useful anyway; if we want to test X11 configurations, we should use the actual X11 backend, which didn't make use of this anyway. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2619>
This commit is contained in:
parent
d517f3ae61
commit
fc8a4afc45
@ -174,9 +174,6 @@ void meta_backend_set_client_pointer_constraint (MetaBackend *backend,
|
||||
|
||||
void meta_backend_monitors_changed (MetaBackend *backend);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_is_stage_views_enabled (void);
|
||||
|
||||
gboolean meta_is_stage_views_scaled (void);
|
||||
|
||||
MetaInputMapper *meta_backend_get_input_mapper (MetaBackend *backend);
|
||||
|
@ -121,8 +121,6 @@ static guint signals[N_SIGNALS];
|
||||
|
||||
static MetaBackend *_backend;
|
||||
|
||||
static gboolean stage_views_disabled = FALSE;
|
||||
|
||||
#define HIDDEN_POINTER_TIMEOUT 300 /* ms */
|
||||
|
||||
/**
|
||||
@ -874,7 +872,6 @@ meta_backend_get_property (GObject *object,
|
||||
static void
|
||||
meta_backend_class_init (MetaBackendClass *klass)
|
||||
{
|
||||
const gchar *mutter_stage_views;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = meta_backend_dispose;
|
||||
@ -955,9 +952,6 @@ meta_backend_class_init (MetaBackendClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
mutter_stage_views = g_getenv ("MUTTER_STAGE_VIEWS");
|
||||
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
|
||||
}
|
||||
|
||||
static MetaMonitorManager *
|
||||
@ -1615,23 +1609,6 @@ meta_backend_get_capabilities (MetaBackend *backend)
|
||||
return META_BACKEND_GET_CLASS (backend)->get_capabilities (backend);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_is_stage_views_enabled:
|
||||
*
|
||||
* Returns whether the #ClutterStage can be rendered using multiple stage views.
|
||||
* In practice, this means we can define a separate framebuffer for each
|
||||
* #MetaLogicalMonitor, rather than rendering everything into a single
|
||||
* framebuffer. For example: in X11, onle one single framebuffer is allowed.
|
||||
*/
|
||||
gboolean
|
||||
meta_is_stage_views_enabled (void)
|
||||
{
|
||||
if (!meta_is_wayland_compositor ())
|
||||
return FALSE;
|
||||
|
||||
return !stage_views_disabled;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_is_stage_views_scaled (void)
|
||||
{
|
||||
@ -1640,9 +1617,6 @@ meta_is_stage_views_scaled (void)
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
MetaLogicalMonitorLayoutMode layout_mode;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
return FALSE;
|
||||
|
||||
layout_mode = monitor_manager->layout_mode;
|
||||
|
||||
return layout_mode == META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
|
||||
|
@ -486,10 +486,7 @@ meta_monitor_manager_dummy_ensure_initial_config (MetaMonitorManager *manager)
|
||||
|
||||
config = meta_monitor_manager_ensure_configured (manager);
|
||||
|
||||
if (meta_is_stage_views_enabled ())
|
||||
meta_monitor_manager_update_logical_state (manager, config);
|
||||
else
|
||||
meta_monitor_manager_update_logical_state_derived (manager, NULL);
|
||||
meta_monitor_manager_update_logical_state (manager, config);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -708,21 +705,12 @@ meta_monitor_manager_dummy_get_max_screen_size (MetaMonitorManager *manager,
|
||||
int *max_width,
|
||||
int *max_height)
|
||||
{
|
||||
if (meta_is_stage_views_enabled ())
|
||||
return FALSE;
|
||||
|
||||
*max_width = 65535;
|
||||
*max_height = 65535;
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static MetaLogicalMonitorLayoutMode
|
||||
meta_monitor_manager_dummy_get_default_layout_mode (MetaMonitorManager *manager)
|
||||
{
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
return META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
|
||||
|
||||
if (is_monitor_framebuffers_scaled ())
|
||||
return META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
|
||||
else
|
||||
|
@ -764,13 +764,6 @@ meta_backend_native_initable_init (GInitable *initable,
|
||||
MetaBackend *backend = META_BACKEND (native);
|
||||
MetaKmsFlags kms_flags;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"The native backend requires stage views");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!meta_backend_is_headless (backend))
|
||||
{
|
||||
const char *session_id = NULL;
|
||||
|
@ -109,11 +109,8 @@ meta_backend_x11_nested_update_screen_size (MetaBackend *backend,
|
||||
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||
MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
|
||||
if (meta_is_stage_views_enabled ())
|
||||
{
|
||||
meta_renderer_rebuild_views (renderer);
|
||||
clutter_stage_clear_stage_views (CLUTTER_STAGE (stage));
|
||||
}
|
||||
meta_renderer_rebuild_views (renderer);
|
||||
clutter_stage_clear_stage_views (CLUTTER_STAGE (stage));
|
||||
clutter_actor_set_size (stage, width, height);
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
|
||||
MetaOutput *output,
|
||||
MetaCrtc *crtc)
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaBackend *backend = meta_renderer_get_backend (renderer);
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||
|
@ -63,17 +63,6 @@ meta_stage_x11_nested_resize (ClutterStageWindow *stage_window,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
MetaRenderer *renderer = meta_backend_get_renderer (backend);
|
||||
MetaRendererX11Nested *renderer_x11_nested =
|
||||
META_RENDERER_X11_NESTED (renderer);
|
||||
|
||||
meta_renderer_x11_nested_ensure_legacy_view (renderer_x11_nested,
|
||||
width, height);
|
||||
}
|
||||
|
||||
clutter_stage_window_parent_iface->resize (stage_window, width, height);
|
||||
}
|
||||
|
||||
|
@ -112,8 +112,6 @@ void
|
||||
meta_monitor_manager_test_set_handles_transforms (MetaMonitorManagerTest *manager_test,
|
||||
gboolean handles_transforms)
|
||||
{
|
||||
g_assert (handles_transforms || meta_is_stage_views_enabled());
|
||||
|
||||
manager_test->handles_transforms = handles_transforms;
|
||||
}
|
||||
|
||||
@ -145,14 +143,7 @@ meta_monitor_manager_test_ensure_initial_config (MetaMonitorManager *manager)
|
||||
|
||||
config = meta_monitor_manager_ensure_configured (manager);
|
||||
|
||||
if (meta_is_stage_views_enabled ())
|
||||
{
|
||||
meta_monitor_manager_update_logical_state (manager, config);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_monitor_manager_update_logical_state_derived (manager, NULL);
|
||||
}
|
||||
meta_monitor_manager_update_logical_state (manager, config);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -261,10 +252,7 @@ meta_monitor_manager_test_apply_monitors_config (MetaMonitorManager *manage
|
||||
manager->screen_width = META_MONITOR_MANAGER_MIN_SCREEN_WIDTH;
|
||||
manager->screen_height = META_MONITOR_MANAGER_MIN_SCREEN_HEIGHT;
|
||||
|
||||
if (meta_is_stage_views_enabled ())
|
||||
meta_monitor_manager_rebuild (manager, NULL);
|
||||
else
|
||||
meta_monitor_manager_rebuild_derived (manager, config);
|
||||
meta_monitor_manager_rebuild (manager, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -293,10 +281,7 @@ meta_monitor_manager_test_apply_monitors_config (MetaMonitorManager *manage
|
||||
|
||||
update_screen_size (manager, config);
|
||||
|
||||
if (meta_is_stage_views_enabled ())
|
||||
meta_monitor_manager_rebuild (manager, config);
|
||||
else
|
||||
meta_monitor_manager_rebuild_derived (manager, config);
|
||||
meta_monitor_manager_rebuild (manager, config);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -399,21 +384,12 @@ meta_monitor_manager_test_get_max_screen_size (MetaMonitorManager *manager,
|
||||
int *max_width,
|
||||
int *max_height)
|
||||
{
|
||||
if (meta_is_stage_views_enabled ())
|
||||
return FALSE;
|
||||
|
||||
*max_width = 65535;
|
||||
*max_height = 65535;
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static MetaLogicalMonitorLayoutMode
|
||||
meta_monitor_manager_test_get_default_layout_mode (MetaMonitorManager *manager)
|
||||
{
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
return META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
|
||||
|
||||
if (is_monitor_framebuffer_scaled ())
|
||||
return META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
|
||||
else
|
||||
|
@ -537,12 +537,6 @@ meta_test_monitor_store_scale (void)
|
||||
.n_configurations = 1
|
||||
};
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
meta_set_custom_monitor_config (test_context, "scale.xml");
|
||||
|
||||
check_monitor_store_configurations (&expect);
|
||||
@ -587,12 +581,6 @@ meta_test_monitor_store_fractional_scale (void)
|
||||
.n_configurations = 1
|
||||
};
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
meta_set_custom_monitor_config (test_context, "fractional-scale.xml");
|
||||
|
||||
check_monitor_store_configurations (&expect);
|
||||
@ -637,12 +625,6 @@ meta_test_monitor_store_high_precision_fractional_scale (void)
|
||||
.n_configurations = 1
|
||||
};
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
meta_set_custom_monitor_config (test_context, "high-precision-fractional-scale.xml");
|
||||
|
||||
check_monitor_store_configurations (&expect);
|
||||
|
@ -1533,12 +1533,6 @@ meta_test_monitor_hidpi_linear_config (void)
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NO_STORED);
|
||||
@ -3094,12 +3088,6 @@ meta_test_monitor_lid_scaled_closed_opened (void)
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_backend_get_monitor_manager (backend);
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NONE);
|
||||
@ -4523,12 +4511,6 @@ meta_test_monitor_orientation_initial_stored_rotated (void)
|
||||
MetaOrientation orientation;
|
||||
unsigned int times_signalled = 0;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
g_test_message ("%s", G_STRFUNC);
|
||||
orientation_mock = meta_sensors_proxy_mock_get ();
|
||||
touch_device = meta_test_add_touch_device (backend);
|
||||
@ -4683,12 +4665,6 @@ meta_test_monitor_orientation_initial_stored_rotated_no_touch (void)
|
||||
MetaOrientation orientation;
|
||||
unsigned int times_signalled = 0;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
g_test_message ("%s", G_STRFUNC);
|
||||
orientation_mock = meta_sensors_proxy_mock_get ();
|
||||
orientation = META_ORIENTATION_RIGHT_UP;
|
||||
@ -5960,12 +5936,6 @@ meta_test_monitor_custom_scale_config (void)
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NONE);
|
||||
@ -6062,12 +6032,6 @@ meta_test_monitor_custom_fractional_scale_config (void)
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NONE);
|
||||
@ -6164,12 +6128,6 @@ meta_test_monitor_custom_high_precision_fractional_scale_config (void)
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NONE);
|
||||
@ -6308,12 +6266,6 @@ meta_test_monitor_custom_tiled_config (void)
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NONE);
|
||||
@ -6471,12 +6423,6 @@ meta_test_monitor_custom_tiled_custom_resolution_config (void)
|
||||
};
|
||||
MetaMonitorTestSetup *test_setup;
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
test_setup = meta_create_monitor_test_setup (test_backend,
|
||||
&test_case.setup,
|
||||
MONITOR_TEST_FLAG_NONE);
|
||||
@ -7621,12 +7567,6 @@ meta_test_monitor_custom_second_rotated_nonnative_config (void)
|
||||
MetaMonitorManagerTest *monitor_manager_test =
|
||||
META_MONITOR_MANAGER_TEST (monitor_manager);
|
||||
|
||||
if (!meta_is_stage_views_enabled ())
|
||||
{
|
||||
g_test_skip ("Not using stage views");
|
||||
return;
|
||||
}
|
||||
|
||||
meta_monitor_manager_test_set_handles_transforms (monitor_manager_test,
|
||||
FALSE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user