mirror of
https://github.com/brl/mutter.git
synced 2025-02-27 18:24:10 +00:00
kms: Use MetaThread source helpers directly
No need to have thin meta_kms_* wrappers, just use the meta_thread_* functions directly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
parent
2e025eea0e
commit
229904cb4b
@ -761,7 +761,7 @@ schedule_retry_page_flip (MetaKmsImplDeviceSimple *impl_device_simple,
|
|||||||
MetaKms *kms = meta_kms_device_get_kms (device);
|
MetaKms *kms = meta_kms_device_get_kms (device);
|
||||||
GSource *source;
|
GSource *source;
|
||||||
|
|
||||||
source = meta_kms_add_source_in_impl (kms, retry_page_flips,
|
source = meta_thread_add_source_in_impl (META_THREAD (kms), retry_page_flips,
|
||||||
impl_device_simple, NULL);
|
impl_device_simple, NULL);
|
||||||
g_source_set_ready_time (source, retry_time_us);
|
g_source_set_ready_time (source, retry_time_us);
|
||||||
|
|
||||||
@ -884,7 +884,7 @@ mode_set_fallback (MetaKmsImplDeviceSimple *impl_device_simple,
|
|||||||
{
|
{
|
||||||
GSource *source;
|
GSource *source;
|
||||||
|
|
||||||
source = meta_kms_add_source_in_impl (kms,
|
source = meta_thread_add_source_in_impl (META_THREAD (kms),
|
||||||
mode_set_fallback_feedback_idle,
|
mode_set_fallback_feedback_idle,
|
||||||
impl_device_simple,
|
impl_device_simple,
|
||||||
NULL);
|
NULL);
|
||||||
@ -947,7 +947,7 @@ dispatch_page_flip (MetaKmsImplDevice *impl_device,
|
|||||||
|
|
||||||
meta_kms_page_flip_data_make_symbolic (page_flip_data);
|
meta_kms_page_flip_data_make_symbolic (page_flip_data);
|
||||||
|
|
||||||
source = meta_kms_add_source_in_impl (kms,
|
source = meta_thread_add_source_in_impl (META_THREAD (kms),
|
||||||
symbolic_page_flip_idle,
|
symbolic_page_flip_idle,
|
||||||
page_flip_data,
|
page_flip_data,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -856,8 +856,10 @@ ensure_device_file (MetaKmsImplDevice *impl_device,
|
|||||||
|
|
||||||
if (!(priv->flags & META_KMS_DEVICE_FLAG_NO_MODE_SETTING))
|
if (!(priv->flags & META_KMS_DEVICE_FLAG_NO_MODE_SETTING))
|
||||||
{
|
{
|
||||||
|
MetaKms *kms = meta_kms_impl_get_kms (priv->impl);
|
||||||
|
|
||||||
priv->fd_source =
|
priv->fd_source =
|
||||||
meta_kms_register_fd_in_impl (meta_kms_impl_get_kms (priv->impl),
|
meta_thread_register_fd_in_impl (META_THREAD (kms),
|
||||||
meta_device_file_get_fd (device_file),
|
meta_device_file_get_fd (device_file),
|
||||||
kms_event_dispatch_in_impl,
|
kms_event_dispatch_in_impl,
|
||||||
impl_device);
|
impl_device);
|
||||||
|
@ -43,16 +43,6 @@ gpointer meta_kms_run_impl_task_sync (MetaKms *kms,
|
|||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
GSource * meta_kms_add_source_in_impl (MetaKms *kms,
|
|
||||||
GSourceFunc func,
|
|
||||||
gpointer user_data,
|
|
||||||
GDestroyNotify user_data_destroy);
|
|
||||||
|
|
||||||
GSource * meta_kms_register_fd_in_impl (MetaKms *kms,
|
|
||||||
int fd,
|
|
||||||
MetaThreadTaskFunc dispatch,
|
|
||||||
gpointer user_data);
|
|
||||||
|
|
||||||
META_EXPORT_TEST
|
META_EXPORT_TEST
|
||||||
MetaKmsResourceChanges meta_kms_update_states_sync (MetaKms *kms,
|
MetaKmsResourceChanges meta_kms_update_states_sync (MetaKms *kms,
|
||||||
GUdevDevice *udev_device);
|
GUdevDevice *udev_device);
|
||||||
|
@ -239,29 +239,6 @@ meta_kms_run_impl_task_sync (MetaKms *kms,
|
|||||||
return meta_thread_run_impl_task_sync (thread, func, user_data, error);
|
return meta_thread_run_impl_task_sync (thread, func, user_data, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
GSource *
|
|
||||||
meta_kms_add_source_in_impl (MetaKms *kms,
|
|
||||||
GSourceFunc func,
|
|
||||||
gpointer user_data,
|
|
||||||
GDestroyNotify user_data_destroy)
|
|
||||||
{
|
|
||||||
MetaThread *thread = META_THREAD (kms);
|
|
||||||
|
|
||||||
return meta_thread_add_source_in_impl (thread, func,
|
|
||||||
user_data, user_data_destroy);
|
|
||||||
}
|
|
||||||
|
|
||||||
GSource *
|
|
||||||
meta_kms_register_fd_in_impl (MetaKms *kms,
|
|
||||||
int fd,
|
|
||||||
MetaThreadTaskFunc dispatch,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
MetaThread *thread = META_THREAD (kms);
|
|
||||||
|
|
||||||
return meta_thread_register_fd_in_impl (thread, fd, dispatch, user_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_kms_in_impl_task (MetaKms *kms)
|
meta_kms_in_impl_task (MetaKms *kms)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user