mirror of
https://github.com/brl/mutter.git
synced 2025-01-14 13:43:08 +00:00
tests/kms: Don't leak MetaKmsFeedback
Also start warning if we don't handle the meta_kms_device_process_update_sync() return value. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2853>
This commit is contained in:
parent
0b325d64f4
commit
e65c6f18b3
@ -75,7 +75,8 @@ GList * meta_kms_device_get_fallback_modes (MetaKmsDevice *device);
|
|||||||
META_EXPORT_TEST
|
META_EXPORT_TEST
|
||||||
MetaKmsFeedback * meta_kms_device_process_update_sync (MetaKmsDevice *device,
|
MetaKmsFeedback * meta_kms_device_process_update_sync (MetaKmsDevice *device,
|
||||||
MetaKmsUpdate *update,
|
MetaKmsUpdate *update,
|
||||||
MetaKmsUpdateFlag flags);
|
MetaKmsUpdateFlag flags)
|
||||||
|
G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
META_EXPORT_TEST
|
META_EXPORT_TEST
|
||||||
void meta_kms_device_disable (MetaKmsDevice *device);
|
void meta_kms_device_disable (MetaKmsDevice *device);
|
||||||
|
@ -81,6 +81,7 @@ typedef struct _MetaKmsPlaneFeedback
|
|||||||
typedef void (* MetaKmsResultListenerFunc) (const MetaKmsFeedback *feedback,
|
typedef void (* MetaKmsResultListenerFunc) (const MetaKmsFeedback *feedback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
META_EXPORT_TEST
|
||||||
void meta_kms_feedback_free (MetaKmsFeedback *feedback);
|
void meta_kms_feedback_free (MetaKmsFeedback *feedback);
|
||||||
|
|
||||||
MetaKmsFeedbackResult meta_kms_feedback_get_result (const MetaKmsFeedback *feedback);
|
MetaKmsFeedbackResult meta_kms_feedback_get_result (const MetaKmsFeedback *feedback);
|
||||||
|
@ -274,6 +274,7 @@ meta_test_kms_device_mode_set (void)
|
|||||||
MetaKmsCrtcState crtc_state;
|
MetaKmsCrtcState crtc_state;
|
||||||
MetaKmsConnectorState connector_state;
|
MetaKmsConnectorState connector_state;
|
||||||
MetaRectangle mode_rect;
|
MetaRectangle mode_rect;
|
||||||
|
MetaKmsFeedback *feedback;
|
||||||
|
|
||||||
device = meta_get_test_kms_device (test_context);
|
device = meta_get_test_kms_device (test_context);
|
||||||
crtc = meta_get_test_kms_crtc (device);
|
crtc = meta_get_test_kms_crtc (device);
|
||||||
@ -296,8 +297,9 @@ meta_test_kms_device_mode_set (void)
|
|||||||
meta_get_mode_fixed_rect_16 (mode),
|
meta_get_mode_fixed_rect_16 (mode),
|
||||||
meta_get_mode_rect (mode),
|
meta_get_mode_rect (mode),
|
||||||
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
||||||
meta_kms_device_process_update_sync (device, update,
|
feedback = meta_kms_device_process_update_sync (device, update,
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
|
meta_kms_feedback_free (feedback);
|
||||||
meta_kms_update_free (update);
|
meta_kms_update_free (update);
|
||||||
|
|
||||||
g_assert_nonnull (meta_kms_crtc_get_current_state (crtc));
|
g_assert_nonnull (meta_kms_crtc_get_current_state (crtc));
|
||||||
@ -329,6 +331,7 @@ meta_test_kms_device_power_save (void)
|
|||||||
{
|
{
|
||||||
MetaKmsDevice *device;
|
MetaKmsDevice *device;
|
||||||
MetaKmsUpdate *update;
|
MetaKmsUpdate *update;
|
||||||
|
MetaKmsFeedback *feedback;
|
||||||
MetaKmsCrtc *crtc;
|
MetaKmsCrtc *crtc;
|
||||||
MetaKmsConnector *connector;
|
MetaKmsConnector *connector;
|
||||||
MetaKmsMode *mode;
|
MetaKmsMode *mode;
|
||||||
@ -359,8 +362,9 @@ meta_test_kms_device_power_save (void)
|
|||||||
meta_get_mode_fixed_rect_16 (mode),
|
meta_get_mode_fixed_rect_16 (mode),
|
||||||
meta_get_mode_rect (mode),
|
meta_get_mode_rect (mode),
|
||||||
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
||||||
meta_kms_device_process_update_sync (device, update,
|
feedback = meta_kms_device_process_update_sync (device, update,
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
|
meta_kms_feedback_free (feedback);
|
||||||
meta_kms_update_free (update);
|
meta_kms_update_free (update);
|
||||||
|
|
||||||
g_assert_true (meta_kms_crtc_is_active (crtc));
|
g_assert_true (meta_kms_crtc_is_active (crtc));
|
||||||
@ -396,8 +400,9 @@ meta_test_kms_device_power_save (void)
|
|||||||
meta_get_mode_fixed_rect_16 (mode),
|
meta_get_mode_fixed_rect_16 (mode),
|
||||||
meta_get_mode_rect (mode),
|
meta_get_mode_rect (mode),
|
||||||
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
||||||
meta_kms_device_process_update_sync (device, update,
|
feedback = meta_kms_device_process_update_sync (device, update,
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
|
meta_kms_feedback_free (feedback);
|
||||||
meta_kms_update_free (update);
|
meta_kms_update_free (update);
|
||||||
|
|
||||||
g_assert_true (meta_kms_crtc_is_active (crtc));
|
g_assert_true (meta_kms_crtc_is_active (crtc));
|
||||||
|
Loading…
Reference in New Issue
Block a user