[mutter] backends: Implement gamma LUT virtual function for MetaCrtcDummy



commit 449327093e56cd70670633799a480783fbbe760c
Author: Sebastian Wick <sebastian wick redhat com>
Date:   Fri Sep 2 13:02:00 2022 +0200

    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>

 src/backends/meta-monitor-manager-dummy.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
---
diff --git a/src/backends/meta-monitor-manager-dummy.c b/src/backends/meta-monitor-manager-dummy.c
index 66d15bda05..1627bc08eb 100644
--- a/src/backends/meta-monitor-manager-dummy.c
+++ b/src/backends/meta-monitor-manager-dummy.c
@@ -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
 meta_crtc_dummy_init (MetaCrtcDummy *crtc_dummy)
 {
@@ -814,4 +833,9 @@ meta_crtc_dummy_init (MetaCrtcDummy *crtc_dummy)
 static void
 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;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]