backends: Implement gamma LUT virtual function for MetaCrtcDummy

Fixes a crash in the nested backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2606>
This commit is contained in:
Sebastian Wick 2022-09-02 13:02:00 +02:00 committed by Marge Bot
parent 01846ffd91
commit 449327093e

View File

@ -806,6 +806,25 @@ meta_output_dummy_class_init (MetaOutputDummyClass *klass)
{ {
} }
static size_t
meta_crtc_dummy_get_gamma_lut_size (MetaCrtc *crtc)
{
return 0;
}
static MetaGammaLut *
meta_crtc_dummy_get_gamma_lut (MetaCrtc *crtc)
{
return NULL;
}
static void
meta_crtc_dummy_set_gamma_lut (MetaCrtc *crtc,
const MetaGammaLut *lut)
{
g_warn_if_reached ();
}
static void static void
meta_crtc_dummy_init (MetaCrtcDummy *crtc_dummy) meta_crtc_dummy_init (MetaCrtcDummy *crtc_dummy)
{ {
@ -814,4 +833,9 @@ meta_crtc_dummy_init (MetaCrtcDummy *crtc_dummy)
static void static void
meta_crtc_dummy_class_init (MetaCrtcDummyClass *klass) meta_crtc_dummy_class_init (MetaCrtcDummyClass *klass)
{ {
MetaCrtcClass *crtc_class = META_CRTC_CLASS (klass);
crtc_class->get_gamma_lut_size = meta_crtc_dummy_get_gamma_lut_size;
crtc_class->get_gamma_lut = meta_crtc_dummy_get_gamma_lut;
crtc_class->set_gamma_lut = meta_crtc_dummy_set_gamma_lut;
} }