mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
kms/update: Stop sealing updates
This isn't very useful anymore, since posting an update takes ownership of it. Not sealing it also means e.g. more listeners can be added after posting. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
parent
54d9fab161
commit
15a91e9fd4
@ -309,8 +309,6 @@ meta_kms_device_process_update_sync (MetaKmsDevice *device,
|
||||
MetaKms *kms = META_KMS (meta_kms_device_get_kms (device));
|
||||
PostUpdateData data;
|
||||
|
||||
meta_kms_update_seal (update);
|
||||
|
||||
data = (PostUpdateData) {
|
||||
.update = update,
|
||||
.flags = flags,
|
||||
@ -347,8 +345,6 @@ meta_kms_device_post_update (MetaKmsDevice *device,
|
||||
|
||||
g_return_if_fail (meta_kms_update_get_device (update) == device);
|
||||
|
||||
meta_kms_update_seal (update);
|
||||
|
||||
data = g_new0 (PostUpdateData, 1);
|
||||
*data = (PostUpdateData) {
|
||||
.update = update,
|
||||
|
@ -156,11 +156,6 @@ MetaKmsFeedback * meta_kms_feedback_new_passed (GList *failed_planes);
|
||||
MetaKmsFeedback * meta_kms_feedback_new_failed (GList *failed_planes,
|
||||
GError *error);
|
||||
|
||||
void meta_kms_update_seal (MetaKmsUpdate *update);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_kms_update_is_sealed (MetaKmsUpdate *update);
|
||||
|
||||
void meta_kms_plane_assignment_set_rotation (MetaKmsPlaneAssignment *plane_assignment,
|
||||
MetaKmsPlaneRotation rotation);
|
||||
|
||||
|
@ -268,7 +268,6 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
|
||||
MetaKmsPlaneAssignment *plane_assignment;
|
||||
MetaKmsAssignPlaneFlag old_flags;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_crtc_get_device (crtc) == update->device);
|
||||
g_assert (meta_kms_plane_get_device (plane) == update->device);
|
||||
g_assert (meta_kms_plane_get_plane_type (plane) !=
|
||||
@ -305,7 +304,6 @@ meta_kms_update_unassign_plane (MetaKmsUpdate *update,
|
||||
{
|
||||
MetaKmsPlaneAssignment *plane_assignment;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_crtc_get_device (crtc) == update->device);
|
||||
g_assert (meta_kms_plane_get_device (plane) == update->device);
|
||||
|
||||
@ -331,7 +329,6 @@ meta_kms_update_mode_set (MetaKmsUpdate *update,
|
||||
{
|
||||
MetaKmsModeSet *mode_set;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_crtc_get_device (crtc) == update->device);
|
||||
|
||||
mode_set = g_new0 (MetaKmsModeSet, 1);
|
||||
@ -376,7 +373,6 @@ meta_kms_update_set_underscanning (MetaKmsUpdate *update,
|
||||
{
|
||||
MetaKmsConnectorUpdate *connector_update;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_connector_get_device (connector) == update->device);
|
||||
|
||||
connector_update = ensure_connector_update (update, connector);
|
||||
@ -392,7 +388,6 @@ meta_kms_update_unset_underscanning (MetaKmsUpdate *update,
|
||||
{
|
||||
MetaKmsConnectorUpdate *connector_update;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_connector_get_device (connector) == update->device);
|
||||
|
||||
connector_update = ensure_connector_update (update, connector);
|
||||
@ -495,7 +490,6 @@ meta_kms_update_set_crtc_gamma (MetaKmsUpdate *update,
|
||||
MetaGammaLut *gamma_update = NULL;
|
||||
const MetaKmsCrtcState *crtc_state = meta_kms_crtc_get_current_state (crtc);
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_crtc_get_device (crtc) == update->device);
|
||||
|
||||
if (gamma)
|
||||
@ -524,7 +518,6 @@ meta_kms_update_add_page_flip_listener (MetaKmsUpdate *upd
|
||||
{
|
||||
MetaKmsPageFlipListener *listener;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
g_assert (meta_kms_crtc_get_device (crtc) == update->device);
|
||||
|
||||
listener = g_new0 (MetaKmsPageFlipListener, 1);
|
||||
@ -549,8 +542,6 @@ meta_kms_update_set_custom_page_flip (MetaKmsUpdate *update,
|
||||
{
|
||||
MetaKmsCustomPageFlip *custom_page_flip;
|
||||
|
||||
g_assert (!meta_kms_update_is_sealed (update));
|
||||
|
||||
custom_page_flip = g_new0 (MetaKmsCustomPageFlip, 1);
|
||||
custom_page_flip->func = func;
|
||||
custom_page_flip->user_data = user_data;
|
||||
@ -589,7 +580,6 @@ void
|
||||
meta_kms_plane_assignment_set_rotation (MetaKmsPlaneAssignment *plane_assignment,
|
||||
MetaKmsPlaneRotation rotation)
|
||||
{
|
||||
g_assert (!meta_kms_update_is_sealed (plane_assignment->update));
|
||||
g_warn_if_fail (rotation);
|
||||
|
||||
plane_assignment->rotation = rotation;
|
||||
@ -728,20 +718,6 @@ meta_kms_update_get_crtc_color_updates (MetaKmsUpdate *update)
|
||||
return update->crtc_color_updates;
|
||||
}
|
||||
|
||||
void
|
||||
meta_kms_update_seal (MetaKmsUpdate *update)
|
||||
{
|
||||
g_warn_if_fail (!update->is_sealed);
|
||||
|
||||
update->is_sealed = TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_kms_update_is_sealed (MetaKmsUpdate *update)
|
||||
{
|
||||
return update->is_sealed;
|
||||
}
|
||||
|
||||
MetaKmsDevice *
|
||||
meta_kms_update_get_device (MetaKmsUpdate *update)
|
||||
{
|
||||
|
@ -113,7 +113,6 @@ meta_test_kms_update_sanity (void)
|
||||
|
||||
update = meta_kms_update_new (device);
|
||||
g_assert (meta_kms_update_get_device (update) == device);
|
||||
g_assert_false (meta_kms_update_is_sealed (update));
|
||||
g_assert_null (meta_kms_update_get_primary_plane_assignment (update, crtc));
|
||||
g_assert_null (meta_kms_update_get_plane_assignments (update));
|
||||
g_assert_null (meta_kms_update_get_mode_sets (update));
|
||||
|
Loading…
Reference in New Issue
Block a user