kms/update: Add helper to checking if an update passed

Instead of comparing values, just add a `did_pass()` helper.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
Jonas Ådahl 2023-05-05 16:37:34 +02:00
parent 5bed90114d
commit ee87654224
2 changed files with 8 additions and 0 deletions

View File

@ -143,6 +143,12 @@ meta_kms_feedback_get_result (const MetaKmsFeedback *feedback)
return feedback->result;
}
gboolean
meta_kms_feedback_did_pass (const MetaKmsFeedback *feedback)
{
return feedback->result == META_KMS_FEEDBACK_PASSED;
}
GList *
meta_kms_feedback_get_failed_planes (const MetaKmsFeedback *feedback)
{

View File

@ -91,6 +91,8 @@ void meta_kms_feedback_unref (MetaKmsFeedback *feedback);
MetaKmsFeedbackResult meta_kms_feedback_get_result (const MetaKmsFeedback *feedback);
gboolean meta_kms_feedback_did_pass (const MetaKmsFeedback *feedback);
GList * meta_kms_feedback_get_failed_planes (const MetaKmsFeedback *feedback);
const GError * meta_kms_feedback_get_error (const MetaKmsFeedback *feedback);