tests/monitor-manager: Hook back up the 'handles_transforms' state
Now directly changing the CRTCs, where it'll be used via MetaCrtcNative. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3812>
This commit is contained in:
parent
dfb56fcd65
commit
cb5b2dbaa7
3 changed files with 29 additions and 5 deletions
|
@ -74,7 +74,9 @@ static gboolean
|
||||||
meta_crtc_test_is_transform_handled (MetaCrtcNative *crtc_native,
|
meta_crtc_test_is_transform_handled (MetaCrtcNative *crtc_native,
|
||||||
MetaMonitorTransform monitor_transform)
|
MetaMonitorTransform monitor_transform)
|
||||||
{
|
{
|
||||||
return TRUE;
|
MetaCrtcTest *crtc_test = META_CRTC_TEST (crtc_native);
|
||||||
|
|
||||||
|
return crtc_test->handles_transforms;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -133,6 +135,8 @@ meta_crtc_test_init (MetaCrtcTest *crtc_test)
|
||||||
crtc_test->gamma.green[i] = gamma;
|
crtc_test->gamma.green[i] = gamma;
|
||||||
crtc_test->gamma.blue[i] = gamma;
|
crtc_test->gamma.blue[i] = gamma;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crtc_test->handles_transforms = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -143,3 +147,10 @@ meta_crtc_test_disable_gamma_lut (MetaCrtcTest *crtc_test)
|
||||||
g_clear_pointer (&crtc_test->gamma.green, g_free);
|
g_clear_pointer (&crtc_test->gamma.green, g_free);
|
||||||
g_clear_pointer (&crtc_test->gamma.blue, g_free);
|
g_clear_pointer (&crtc_test->gamma.blue, g_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_crtc_test_set_is_transform_handled (MetaCrtcTest *crtc_test,
|
||||||
|
gboolean handles_transforms)
|
||||||
|
{
|
||||||
|
crtc_test->handles_transforms = handles_transforms;
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ struct _MetaCrtcTest
|
||||||
uint16_t *green;
|
uint16_t *green;
|
||||||
uint16_t *blue;
|
uint16_t *blue;
|
||||||
} gamma;
|
} gamma;
|
||||||
|
|
||||||
|
gboolean handles_transforms;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define META_TYPE_CRTC_TEST (meta_crtc_test_get_type ())
|
#define META_TYPE_CRTC_TEST (meta_crtc_test_get_type ())
|
||||||
|
@ -39,3 +41,6 @@ G_DECLARE_FINAL_TYPE (MetaCrtcTest, meta_crtc_test,
|
||||||
|
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
void meta_crtc_test_disable_gamma_lut (MetaCrtcTest *crtc_test);
|
void meta_crtc_test_disable_gamma_lut (MetaCrtcTest *crtc_test);
|
||||||
|
|
||||||
|
void meta_crtc_test_set_is_transform_handled (MetaCrtcTest *crtc_test,
|
||||||
|
gboolean handles_transforms);
|
||||||
|
|
|
@ -35,8 +35,6 @@ struct _MetaMonitorManagerTest
|
||||||
{
|
{
|
||||||
MetaMonitorManagerNative parent;
|
MetaMonitorManagerNative parent;
|
||||||
|
|
||||||
gboolean handles_transforms;
|
|
||||||
|
|
||||||
int tiled_monitor_count;
|
int tiled_monitor_count;
|
||||||
|
|
||||||
MetaLogicalMonitorLayoutMode layout_mode;
|
MetaLogicalMonitorLayoutMode layout_mode;
|
||||||
|
@ -113,7 +111,18 @@ void
|
||||||
meta_monitor_manager_test_set_handles_transforms (MetaMonitorManagerTest *manager_test,
|
meta_monitor_manager_test_set_handles_transforms (MetaMonitorManagerTest *manager_test,
|
||||||
gboolean handles_transforms)
|
gboolean handles_transforms)
|
||||||
{
|
{
|
||||||
manager_test->handles_transforms = handles_transforms;
|
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_test);
|
||||||
|
MetaBackend *backend = meta_monitor_manager_get_backend (manager);
|
||||||
|
MetaBackendTest *backend_test = META_BACKEND_TEST (backend);
|
||||||
|
MetaGpu *gpu = meta_backend_test_get_gpu (backend_test);
|
||||||
|
GList *l;
|
||||||
|
|
||||||
|
for (l = meta_gpu_get_crtcs (gpu); l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaCrtcTest *crtc_test = META_CRTC_TEST (l->data);
|
||||||
|
|
||||||
|
meta_crtc_test_set_is_transform_handled (crtc_test, handles_transforms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -221,7 +230,6 @@ meta_monitor_manager_test_dispose (GObject *object)
|
||||||
static void
|
static void
|
||||||
meta_monitor_manager_test_init (MetaMonitorManagerTest *manager_test)
|
meta_monitor_manager_test_init (MetaMonitorManagerTest *manager_test)
|
||||||
{
|
{
|
||||||
manager_test->handles_transforms = TRUE;
|
|
||||||
manager_test->layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
|
manager_test->layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue