1
0
Fork 0

backends/native: Rename crtc_gamma to crtc_color_updates

We need to update more CRTC color pipeline properties in the future.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2861>
This commit is contained in:
Sebastian Wick 2023-02-17 23:18:39 +01:00 committed by Marge Bot
parent 4cf73fcfed
commit 37639295db
6 changed files with 25 additions and 25 deletions

View file

@ -276,7 +276,7 @@ meta_kms_crtc_predict_state_in_impl (MetaKmsCrtc *crtc,
MetaKmsUpdate *update) MetaKmsUpdate *update)
{ {
GList *mode_sets; GList *mode_sets;
GList *crtc_gammas; GList *crtc_color_updates;
GList *l; GList *l;
mode_sets = meta_kms_update_get_mode_sets (update); mode_sets = meta_kms_update_get_mode_sets (update);
@ -313,8 +313,8 @@ meta_kms_crtc_predict_state_in_impl (MetaKmsCrtc *crtc,
break; break;
} }
crtc_gammas = meta_kms_update_get_crtc_gammas (update); crtc_color_updates = meta_kms_update_get_crtc_color_updates (update);
for (l = crtc_gammas; l; l = l->next) for (l = crtc_color_updates; l; l = l->next)
{ {
MetaKmsCrtcGamma *gamma = l->data; MetaKmsCrtcGamma *gamma = l->data;

View file

@ -613,13 +613,13 @@ process_plane_assignment (MetaKmsImplDevice *impl_device,
} }
static gboolean static gboolean
process_crtc_gamma (MetaKmsImplDevice *impl_device, process_crtc_color_updates (MetaKmsImplDevice *impl_device,
MetaKmsUpdate *update, MetaKmsUpdate *update,
drmModeAtomicReq *req, drmModeAtomicReq *req,
GArray *blob_ids, GArray *blob_ids,
gpointer update_entry, gpointer update_entry,
gpointer user_data, gpointer user_data,
GError **error) GError **error)
{ {
MetaKmsCrtcGamma *gamma = update_entry; MetaKmsCrtcGamma *gamma = update_entry;
MetaKmsCrtc *crtc = gamma->crtc; MetaKmsCrtc *crtc = gamma->crtc;
@ -995,9 +995,9 @@ meta_kms_impl_device_atomic_process_update (MetaKmsImplDevice *impl_device,
update, update,
req, req,
blob_ids, blob_ids,
meta_kms_update_get_crtc_gammas (update), meta_kms_update_get_crtc_color_updates (update),
NULL, NULL,
process_crtc_gamma, process_crtc_color_updates,
&error)) &error))
goto err; goto err;

View file

@ -503,10 +503,10 @@ process_mode_set (MetaKmsImplDevice *impl_device,
} }
static gboolean static gboolean
process_crtc_gamma (MetaKmsImplDevice *impl_device, process_crtc_color_updates (MetaKmsImplDevice *impl_device,
MetaKmsUpdate *update, MetaKmsUpdate *update,
gpointer update_entry, gpointer update_entry,
GError **error) GError **error)
{ {
MetaKmsCrtcGamma *gamma = update_entry; MetaKmsCrtcGamma *gamma = update_entry;
MetaKmsCrtc *crtc = gamma->crtc; MetaKmsCrtc *crtc = gamma->crtc;
@ -1522,8 +1522,8 @@ meta_kms_impl_device_simple_process_update (MetaKmsImplDevice *impl_device,
if (!process_entries (impl_device, if (!process_entries (impl_device,
update, update,
meta_kms_update_get_crtc_gammas (update), meta_kms_update_get_crtc_color_updates (update),
process_crtc_gamma, process_crtc_color_updates,
&error)) &error))
goto err; goto err;

View file

@ -163,7 +163,7 @@ META_EXPORT_TEST
GList * meta_kms_update_get_connector_updates (MetaKmsUpdate *update); GList * meta_kms_update_get_connector_updates (MetaKmsUpdate *update);
META_EXPORT_TEST META_EXPORT_TEST
GList * meta_kms_update_get_crtc_gammas (MetaKmsUpdate *update); GList * meta_kms_update_get_crtc_color_updates (MetaKmsUpdate *update);
MetaKmsCustomPageFlip * meta_kms_update_take_custom_page_flip_func (MetaKmsUpdate *update); MetaKmsCustomPageFlip * meta_kms_update_take_custom_page_flip_func (MetaKmsUpdate *update);

View file

@ -38,7 +38,7 @@ struct _MetaKmsUpdate
GList *mode_sets; GList *mode_sets;
GList *plane_assignments; GList *plane_assignments;
GList *connector_updates; GList *connector_updates;
GList *crtc_gammas; GList *crtc_color_updates;
MetaKmsCustomPageFlip *custom_page_flip; MetaKmsCustomPageFlip *custom_page_flip;
@ -415,7 +415,7 @@ meta_kms_update_set_crtc_gamma (MetaKmsUpdate *update,
gamma = meta_kms_crtc_gamma_new (crtc, size, red, green, blue); gamma = meta_kms_crtc_gamma_new (crtc, size, red, green, blue);
update->crtc_gammas = g_list_prepend (update->crtc_gammas, gamma); update->crtc_color_updates = g_list_prepend (update->crtc_color_updates, gamma);
} }
void void
@ -628,9 +628,9 @@ meta_kms_update_get_connector_updates (MetaKmsUpdate *update)
} }
GList * GList *
meta_kms_update_get_crtc_gammas (MetaKmsUpdate *update) meta_kms_update_get_crtc_color_updates (MetaKmsUpdate *update)
{ {
return update->crtc_gammas; return update->crtc_color_updates;
} }
void void
@ -700,7 +700,7 @@ meta_kms_update_free (MetaKmsUpdate *update)
g_list_free_full (update->page_flip_listeners, g_list_free_full (update->page_flip_listeners,
(GDestroyNotify) meta_kms_page_flip_listener_free); (GDestroyNotify) meta_kms_page_flip_listener_free);
g_list_free_full (update->connector_updates, g_free); g_list_free_full (update->connector_updates, g_free);
g_list_free_full (update->crtc_gammas, (GDestroyNotify) meta_kms_crtc_gamma_free); g_list_free_full (update->crtc_color_updates, (GDestroyNotify) meta_kms_crtc_gamma_free);
g_clear_pointer (&update->custom_page_flip, meta_kms_custom_page_flip_free); g_clear_pointer (&update->custom_page_flip, meta_kms_custom_page_flip_free);
g_free (update); g_free (update);

View file

@ -49,7 +49,7 @@ meta_test_kms_update_sanity (void)
g_assert_null (meta_kms_update_get_mode_sets (update)); g_assert_null (meta_kms_update_get_mode_sets (update));
g_assert_null (meta_kms_update_get_page_flip_listeners (update)); g_assert_null (meta_kms_update_get_page_flip_listeners (update));
g_assert_null (meta_kms_update_get_connector_updates (update)); g_assert_null (meta_kms_update_get_connector_updates (update));
g_assert_null (meta_kms_update_get_crtc_gammas (update)); g_assert_null (meta_kms_update_get_crtc_color_updates (update));
meta_kms_update_free (update); meta_kms_update_free (update);
} }