mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
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:
parent
f3f1db5e33
commit
8ca94f4d3f
@ -229,11 +229,7 @@ meta_gamma_lut_copy_to_size (const MetaGammaLut *gamma,
|
||||
if (gamma->size == target_size)
|
||||
return meta_gamma_lut_copy (gamma);
|
||||
|
||||
out = meta_gamma_lut_new (target_size, NULL, NULL, NULL);
|
||||
|
||||
out->red = g_new0 (uint16_t, target_size);
|
||||
out->green = g_new0 (uint16_t, target_size);
|
||||
out->blue = g_new0 (uint16_t, target_size);
|
||||
out = meta_gamma_lut_new_sized (target_size);
|
||||
|
||||
if (target_size >= gamma->size)
|
||||
{
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user