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:
parent
5bed90114d
commit
ee87654224
@ -143,6 +143,12 @@ meta_kms_feedback_get_result (const MetaKmsFeedback *feedback)
|
|||||||
return feedback->result;
|
return feedback->result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_kms_feedback_did_pass (const MetaKmsFeedback *feedback)
|
||||||
|
{
|
||||||
|
return feedback->result == META_KMS_FEEDBACK_PASSED;
|
||||||
|
}
|
||||||
|
|
||||||
GList *
|
GList *
|
||||||
meta_kms_feedback_get_failed_planes (const MetaKmsFeedback *feedback)
|
meta_kms_feedback_get_failed_planes (const MetaKmsFeedback *feedback)
|
||||||
{
|
{
|
||||||
|
@ -91,6 +91,8 @@ void meta_kms_feedback_unref (MetaKmsFeedback *feedback);
|
|||||||
|
|
||||||
MetaKmsFeedbackResult meta_kms_feedback_get_result (const 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);
|
GList * meta_kms_feedback_get_failed_planes (const MetaKmsFeedback *feedback);
|
||||||
|
|
||||||
const GError * meta_kms_feedback_get_error (const MetaKmsFeedback *feedback);
|
const GError * meta_kms_feedback_get_error (const MetaKmsFeedback *feedback);
|
||||||
|
Loading…
Reference in New Issue
Block a user