backends: Use meta_gamma_lut_new_sized() in a few more places

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2944>
This commit is contained in:
Jonas Ådahl
2023-03-30 12:05:13 +02:00
committed by Marge Bot
parent f3f1db5e33
commit 8ca94f4d3f
2 changed files with 2 additions and 11 deletions

View File

@ -170,12 +170,7 @@ read_crtc_legacy_gamma (MetaKmsCrtc *crtc,
{
crtc_state->gamma.size = drm_crtc->gamma_size;
crtc_state->gamma.supported = drm_crtc->gamma_size != 0;
crtc_state->gamma.value = meta_gamma_lut_new (drm_crtc->gamma_size,
NULL, NULL, NULL);
crtc_state->gamma.value->red = g_new0 (uint16_t, drm_crtc->gamma_size);
crtc_state->gamma.value->green = g_new0 (uint16_t, drm_crtc->gamma_size);
crtc_state->gamma.value->blue = g_new0 (uint16_t, drm_crtc->gamma_size);
crtc_state->gamma.value = meta_gamma_lut_new_sized (drm_crtc->gamma_size);
drmModeCrtcGetGamma (meta_kms_impl_device_get_fd (impl_device),
crtc->id,