mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
tests: Make it possible to emulate backend not supporting tranforms
https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
99a0b43f28
commit
c30cb069f5
@ -34,6 +34,7 @@ struct _MetaMonitorManagerTest
|
||||
MetaMonitorManager parent;
|
||||
|
||||
gboolean is_lid_closed;
|
||||
gboolean handles_transforms;
|
||||
|
||||
int tiled_monitor_count;
|
||||
|
||||
@ -74,6 +75,15 @@ meta_monitor_manager_test_set_is_lid_closed (MetaMonitorManagerTest *manager_tes
|
||||
manager_test->is_lid_closed = is_lid_closed;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
int
|
||||
meta_monitor_manager_test_get_tiled_monitor_count (MetaMonitorManagerTest *manager_test)
|
||||
{
|
||||
@ -361,7 +371,9 @@ meta_monitor_manager_test_is_transform_handled (MetaMonitorManager *manager,
|
||||
MetaCrtc *crtc,
|
||||
MetaMonitorTransform transform)
|
||||
{
|
||||
return TRUE;
|
||||
MetaMonitorManagerTest *manager_test = META_MONITOR_MANAGER_TEST (manager);
|
||||
|
||||
return manager_test->handles_transforms;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -450,6 +462,8 @@ meta_monitor_manager_test_init (MetaMonitorManagerTest *manager_test)
|
||||
{
|
||||
g_assert (_initial_test_setup);
|
||||
|
||||
manager_test->handles_transforms = TRUE;
|
||||
|
||||
manager_test->test_setup = _initial_test_setup;
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,9 @@ void meta_monitor_manager_test_emulate_hotplug (MetaMonitorManagerTest *manager_
|
||||
void meta_monitor_manager_test_set_is_lid_closed (MetaMonitorManagerTest *manager_test,
|
||||
gboolean is_lid_closed);
|
||||
|
||||
void meta_monitor_manager_test_set_handles_transforms (MetaMonitorManagerTest *manager_test,
|
||||
gboolean handles_transforms);
|
||||
|
||||
int meta_monitor_manager_test_get_tiled_monitor_count (MetaMonitorManagerTest *manager_test);
|
||||
|
||||
#endif /* META_MONITOR_MANAGER_TEST_H */
|
||||
|
Loading…
Reference in New Issue
Block a user