frame/native: Remember whether the frame carried a kms update
So that information is available in e.g. after_update handlers. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2823>
This commit is contained in:
parent
ff246a2dc8
commit
020d128d15
@ -30,6 +30,7 @@ struct _MetaFrameNative
|
|||||||
ClutterFrame base;
|
ClutterFrame base;
|
||||||
|
|
||||||
MetaKmsUpdate *kms_update;
|
MetaKmsUpdate *kms_update;
|
||||||
|
gboolean had_kms_update;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -59,6 +60,7 @@ meta_frame_native_set_kms_update (MetaFrameNative *frame_native,
|
|||||||
g_return_if_fail (!frame_native->kms_update);
|
g_return_if_fail (!frame_native->kms_update);
|
||||||
|
|
||||||
frame_native->kms_update = kms_update;
|
frame_native->kms_update = kms_update;
|
||||||
|
frame_native->had_kms_update = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaKmsUpdate *
|
MetaKmsUpdate *
|
||||||
@ -73,6 +75,7 @@ meta_frame_native_ensure_kms_update (MetaFrameNative *frame_native,
|
|||||||
}
|
}
|
||||||
|
|
||||||
frame_native->kms_update = meta_kms_update_new (kms_device);
|
frame_native->kms_update = meta_kms_update_new (kms_device);
|
||||||
|
frame_native->had_kms_update = TRUE;
|
||||||
return frame_native->kms_update;
|
return frame_native->kms_update;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,3 +90,9 @@ meta_frame_native_has_kms_update (MetaFrameNative *frame_native)
|
|||||||
{
|
{
|
||||||
return !!frame_native->kms_update;
|
return !!frame_native->kms_update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_frame_native_had_kms_update (MetaFrameNative *frame_native)
|
||||||
|
{
|
||||||
|
return frame_native->had_kms_update;
|
||||||
|
}
|
||||||
|
@ -43,4 +43,7 @@ MetaKmsUpdate * meta_frame_native_steal_kms_update (MetaFrameNative *frame_nativ
|
|||||||
META_EXPORT_TEST
|
META_EXPORT_TEST
|
||||||
gboolean meta_frame_native_has_kms_update (MetaFrameNative *frame_native);
|
gboolean meta_frame_native_has_kms_update (MetaFrameNative *frame_native);
|
||||||
|
|
||||||
|
META_EXPORT_TEST
|
||||||
|
gboolean meta_frame_native_had_kms_update (MetaFrameNative *frame_native);
|
||||||
|
|
||||||
#endif /* META_FRAME_NATIVE_H */
|
#endif /* META_FRAME_NATIVE_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user