From 75d00027ca3d328d41aee4572f28094b8dfb0f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sun, 12 Nov 2023 15:10:13 +0100 Subject: [PATCH] kms: Remove dead MetaKmsPageFlipListenerFlag type Unused since 02b1cfe08fc3 ("onscreen/native: Handle unexpected scanout failures async"). Part-of: --- src/backends/native/meta-kms-cursor-manager.c | 1 - src/backends/native/meta-kms-impl-device-atomic.c | 1 - src/backends/native/meta-kms-impl-device-simple.c | 2 -- src/backends/native/meta-kms-impl-device.c | 1 - src/backends/native/meta-kms-page-flip-private.h | 1 - src/backends/native/meta-kms-page-flip.c | 6 +----- src/backends/native/meta-kms-types.h | 1 - src/backends/native/meta-kms-update-private.h | 1 - src/backends/native/meta-kms-update.c | 2 -- src/backends/native/meta-kms-update.h | 6 ------ src/backends/native/meta-onscreen-native.c | 2 -- src/tests/native-kms-updates.c | 4 ---- 12 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/backends/native/meta-kms-cursor-manager.c b/src/backends/native/meta-kms-cursor-manager.c index 68798b16a..3fbd2d9f0 100644 --- a/src/backends/native/meta-kms-cursor-manager.c +++ b/src/backends/native/meta-kms-cursor-manager.c @@ -420,7 +420,6 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl, meta_kms_update_add_page_flip_listener (update, crtc, &cursor_page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, meta_thread_impl_get_main_context (thread_impl), crtc_state_impl_ref (crtc_state_impl), (GDestroyNotify) crtc_state_impl_unref); diff --git a/src/backends/native/meta-kms-impl-device-atomic.c b/src/backends/native/meta-kms-impl-device-atomic.c index f2f7acecd..9a63ce196 100644 --- a/src/backends/native/meta-kms-impl-device-atomic.c +++ b/src/backends/native/meta-kms-impl-device-atomic.c @@ -789,7 +789,6 @@ process_page_flip_listener (MetaKmsImplDevice *impl_device, listener_destroy_notify = g_steal_pointer (&listener->destroy_notify); meta_kms_page_flip_data_add_listener (page_flip_data, listener->vtable, - listener->flags, listener->main_context, listener_user_data, listener_destroy_notify); diff --git a/src/backends/native/meta-kms-impl-device-simple.c b/src/backends/native/meta-kms-impl-device-simple.c index 926d3bf81..fd4bfcfa6 100644 --- a/src/backends/native/meta-kms-impl-device-simple.c +++ b/src/backends/native/meta-kms-impl-device-simple.c @@ -1103,7 +1103,6 @@ generate_page_flip_datas (MetaKmsImplDevice *impl_device, destroy_notify = g_steal_pointer (&listener->destroy_notify); meta_kms_page_flip_data_add_listener (page_flip_data, listener->vtable, - listener->flags, listener->main_context, user_data, destroy_notify); @@ -1126,7 +1125,6 @@ generate_page_flip_datas (MetaKmsImplDevice *impl_device, g_steal_pointer (&other_listener->destroy_notify); meta_kms_page_flip_data_add_listener (page_flip_data, other_listener->vtable, - other_listener->flags, other_listener->main_context, other_user_data, other_destroy_notify); diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c index ee391045f..cbedd54a4 100644 --- a/src/backends/native/meta-kms-impl-device.c +++ b/src/backends/native/meta-kms-impl-device.c @@ -1310,7 +1310,6 @@ do_process (MetaKmsImplDevice *impl_device, meta_kms_update_add_page_flip_listener (update, crtc_frame->crtc, &crtc_page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, thread_context, crtc_frame, NULL); crtc_frame->pending_page_flip = TRUE; diff --git a/src/backends/native/meta-kms-page-flip-private.h b/src/backends/native/meta-kms-page-flip-private.h index e08f576c6..e7620dacf 100644 --- a/src/backends/native/meta-kms-page-flip-private.h +++ b/src/backends/native/meta-kms-page-flip-private.h @@ -34,7 +34,6 @@ void meta_kms_page_flip_data_unref (MetaKmsPageFlipData *page_flip_data); void meta_kms_page_flip_data_add_listener (MetaKmsPageFlipData *page_flip_data, const MetaKmsPageFlipListenerVtable *vtable, - MetaKmsPageFlipListenerFlag flags, GMainContext *main_context, gpointer user_data, GDestroyNotify destroy_notify); diff --git a/src/backends/native/meta-kms-page-flip.c b/src/backends/native/meta-kms-page-flip.c index c33bb7bf6..78bd021a4 100644 --- a/src/backends/native/meta-kms-page-flip.c +++ b/src/backends/native/meta-kms-page-flip.c @@ -27,7 +27,6 @@ typedef struct _MetaKmsPageFlipClosure { const MetaKmsPageFlipListenerVtable *vtable; - MetaKmsPageFlipListenerFlag flags; GMainContext *main_context; gpointer user_data; GDestroyNotify destroy_notify; @@ -55,7 +54,6 @@ struct _MetaKmsPageFlipData static MetaKmsPageFlipClosure * meta_kms_page_flip_closure_new (const MetaKmsPageFlipListenerVtable *vtable, - MetaKmsPageFlipListenerFlag flags, GMainContext *main_context, gpointer user_data, GDestroyNotify destroy_notify) @@ -65,7 +63,6 @@ meta_kms_page_flip_closure_new (const MetaKmsPageFlipListenerVtable *vtable, closure = g_new0 (MetaKmsPageFlipClosure, 1); *closure = (MetaKmsPageFlipClosure) { .vtable = vtable, - .flags = flags, .main_context = main_context, .user_data = user_data, .destroy_notify = destroy_notify, @@ -131,14 +128,13 @@ meta_kms_page_flip_data_unref (MetaKmsPageFlipData *page_flip_data) void meta_kms_page_flip_data_add_listener (MetaKmsPageFlipData *page_flip_data, const MetaKmsPageFlipListenerVtable *vtable, - MetaKmsPageFlipListenerFlag flags, GMainContext *main_context, gpointer user_data, GDestroyNotify destroy_notify) { MetaKmsPageFlipClosure *closure; - closure = meta_kms_page_flip_closure_new (vtable, flags, + closure = meta_kms_page_flip_closure_new (vtable, main_context, user_data, destroy_notify); diff --git a/src/backends/native/meta-kms-types.h b/src/backends/native/meta-kms-types.h index c38d1ab3c..a065bd207 100644 --- a/src/backends/native/meta-kms-types.h +++ b/src/backends/native/meta-kms-types.h @@ -35,7 +35,6 @@ typedef struct _MetaKmsMode MetaKmsMode; typedef struct _MetaKmsFeedback MetaKmsFeedback; typedef struct _MetaKmsPageFlipListenerVtable MetaKmsPageFlipListenerVtable; -typedef enum _MetaKmsPageFlipListenerFlag MetaKmsPageFlipListenerFlag; typedef struct _MetaKmsImpl MetaKmsImpl; typedef struct _MetaKmsImplDevice MetaKmsImplDevice; diff --git a/src/backends/native/meta-kms-update-private.h b/src/backends/native/meta-kms-update-private.h index edddd3e4a..9e0b9faf3 100644 --- a/src/backends/native/meta-kms-update-private.h +++ b/src/backends/native/meta-kms-update-private.h @@ -117,7 +117,6 @@ typedef struct _MetaKmsPageFlipListener MetaKmsCrtc *crtc; const MetaKmsPageFlipListenerVtable *vtable; - MetaKmsPageFlipListenerFlag flags; GMainContext *main_context; gpointer user_data; GDestroyNotify destroy_notify; diff --git a/src/backends/native/meta-kms-update.c b/src/backends/native/meta-kms-update.c index 5189c5ab3..13b30061a 100644 --- a/src/backends/native/meta-kms-update.c +++ b/src/backends/native/meta-kms-update.c @@ -525,7 +525,6 @@ void meta_kms_update_add_page_flip_listener (MetaKmsUpdate *update, MetaKmsCrtc *crtc, const MetaKmsPageFlipListenerVtable *vtable, - MetaKmsPageFlipListenerFlag flags, GMainContext *main_context, gpointer user_data, GDestroyNotify destroy_notify) @@ -541,7 +540,6 @@ meta_kms_update_add_page_flip_listener (MetaKmsUpdate *upd *listener = (MetaKmsPageFlipListener) { .crtc = crtc, .vtable = vtable, - .flags = flags, .main_context = main_context, .user_data = user_data, .destroy_notify = destroy_notify, diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h index 321002f6d..7acf2fd48 100644 --- a/src/backends/native/meta-kms-update.h +++ b/src/backends/native/meta-kms-update.h @@ -42,11 +42,6 @@ typedef enum _MetaKmsAssignPlaneFlag META_KMS_ASSIGN_PLANE_FLAG_DIRECT_SCANOUT = 1 << 2, } MetaKmsAssignPlaneFlag; -enum _MetaKmsPageFlipListenerFlag -{ - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE = 0, -}; - struct _MetaKmsPageFlipListenerVtable { void (* flipped) (MetaKmsCrtc *crtc, @@ -174,7 +169,6 @@ META_EXPORT_TEST void meta_kms_update_add_page_flip_listener (MetaKmsUpdate *update, MetaKmsCrtc *crtc, const MetaKmsPageFlipListenerVtable *vtable, - MetaKmsPageFlipListenerFlag flags, GMainContext *main_context, gpointer user_data, GDestroyNotify destroy_notify); diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c index 7510af203..29500d94e 100644 --- a/src/backends/native/meta-onscreen-native.c +++ b/src/backends/native/meta-onscreen-native.c @@ -469,7 +469,6 @@ meta_onscreen_native_flip_crtc (CoglOnscreen *onscreen, meta_kms_update_add_page_flip_listener (kms_update, kms_crtc, &page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, NULL, g_object_ref (view), g_object_unref); @@ -1584,7 +1583,6 @@ meta_onscreen_native_finish_frame (CoglOnscreen *onscreen, meta_kms_update_add_page_flip_listener (kms_update, kms_crtc, &page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, NULL, g_object_ref (onscreen_native->view), g_object_unref); diff --git a/src/tests/native-kms-updates.c b/src/tests/native-kms-updates.c index 235ef7f57..72da729c0 100644 --- a/src/tests/native-kms-updates.c +++ b/src/tests/native-kms-updates.c @@ -393,7 +393,6 @@ meta_test_kms_update_page_flip (void) data.thread = g_thread_self (); meta_kms_update_add_page_flip_listener (update, crtc, &page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, NULL, &data, page_flip_data_destroy); @@ -416,7 +415,6 @@ meta_test_kms_update_page_flip (void) META_KMS_ASSIGN_PLANE_FLAG_NONE); meta_kms_update_add_page_flip_listener (update, crtc, &page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, NULL, &data, page_flip_data_destroy); @@ -672,7 +670,6 @@ off_thread_page_flip_thread_func (gpointer user_data) page_flip_data.thread = g_thread_self (); meta_kms_update_add_page_flip_listener (update, crtc, &page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, data->main_context, &page_flip_data, page_flip_data_destroy); @@ -690,7 +687,6 @@ off_thread_page_flip_thread_func (gpointer user_data) meta_kms_update_add_page_flip_listener (update, crtc, &page_flip_listener_vtable, - META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE, data->main_context, &page_flip_data, page_flip_data_destroy);