mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05: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,8 +761,8 @@ schedule_retry_page_flip (MetaKmsImplDeviceSimple *impl_device_simple,
|
||||
MetaKms *kms = meta_kms_device_get_kms (device);
|
||||
GSource *source;
|
||||
|
||||
source = meta_kms_add_source_in_impl (kms, retry_page_flips,
|
||||
impl_device_simple, NULL);
|
||||
source = meta_thread_add_source_in_impl (META_THREAD (kms), retry_page_flips,
|
||||
impl_device_simple, NULL);
|
||||
g_source_set_ready_time (source, retry_time_us);
|
||||
|
||||
impl_device_simple->retry_page_flips_source = source;
|
||||
@ -884,10 +884,10 @@ mode_set_fallback (MetaKmsImplDeviceSimple *impl_device_simple,
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
source = meta_kms_add_source_in_impl (kms,
|
||||
mode_set_fallback_feedback_idle,
|
||||
impl_device_simple,
|
||||
NULL);
|
||||
source = meta_thread_add_source_in_impl (META_THREAD (kms),
|
||||
mode_set_fallback_feedback_idle,
|
||||
impl_device_simple,
|
||||
NULL);
|
||||
impl_device_simple->mode_set_fallback_feedback_source = source;
|
||||
}
|
||||
|
||||
@ -947,10 +947,10 @@ dispatch_page_flip (MetaKmsImplDevice *impl_device,
|
||||
|
||||
meta_kms_page_flip_data_make_symbolic (page_flip_data);
|
||||
|
||||
source = meta_kms_add_source_in_impl (kms,
|
||||
symbolic_page_flip_idle,
|
||||
page_flip_data,
|
||||
NULL);
|
||||
source = meta_thread_add_source_in_impl (META_THREAD (kms),
|
||||
symbolic_page_flip_idle,
|
||||
page_flip_data,
|
||||
NULL);
|
||||
|
||||
g_source_set_ready_time (source, 0);
|
||||
g_source_unref (source);
|
||||
|
@ -856,11 +856,13 @@ ensure_device_file (MetaKmsImplDevice *impl_device,
|
||||
|
||||
if (!(priv->flags & META_KMS_DEVICE_FLAG_NO_MODE_SETTING))
|
||||
{
|
||||
MetaKms *kms = meta_kms_impl_get_kms (priv->impl);
|
||||
|
||||
priv->fd_source =
|
||||
meta_kms_register_fd_in_impl (meta_kms_impl_get_kms (priv->impl),
|
||||
meta_device_file_get_fd (device_file),
|
||||
kms_event_dispatch_in_impl,
|
||||
impl_device);
|
||||
meta_thread_register_fd_in_impl (META_THREAD (kms),
|
||||
meta_device_file_get_fd (device_file),
|
||||
kms_event_dispatch_in_impl,
|
||||
impl_device);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -43,16 +43,6 @@ gpointer meta_kms_run_impl_task_sync (MetaKms *kms,
|
||||
gpointer user_data,
|
||||
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
|
||||
MetaKmsResourceChanges meta_kms_update_states_sync (MetaKms *kms,
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
meta_kms_in_impl_task (MetaKms *kms)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user