[mutter] monitor-manager-kms: Set gamma on MetaKmsUpdate directly



commit 9d7be405027eeeaf1d41b46cf65f85903dfa6106
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Jul 14 17:03:34 2020 +0200

    monitor-manager-kms: Set gamma on MetaKmsUpdate directly
    
    The meta_kms_crtc_* helper didn't do anything more than call another
    function with the exact same arguments.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>

 src/backends/native/meta-kms-crtc.c            | 11 -----------
 src/backends/native/meta-kms-crtc.h            |  7 -------
 src/backends/native/meta-kms-update-private.h  |  7 -------
 src/backends/native/meta-kms-update.h          |  7 +++++++
 src/backends/native/meta-monitor-manager-kms.c |  3 +--
 5 files changed, 8 insertions(+), 27 deletions(-)
---
diff --git a/src/backends/native/meta-kms-crtc.c b/src/backends/native/meta-kms-crtc.c
index c4b71c50eb..7de317378b 100644
--- a/src/backends/native/meta-kms-crtc.c
+++ b/src/backends/native/meta-kms-crtc.c
@@ -48,17 +48,6 @@ struct _MetaKmsCrtc
 
 G_DEFINE_TYPE (MetaKmsCrtc, meta_kms_crtc, G_TYPE_OBJECT)
 
-void
-meta_kms_crtc_set_gamma (MetaKmsCrtc    *crtc,
-                         MetaKmsUpdate  *update,
-                         int             size,
-                         const uint16_t *red,
-                         const uint16_t *green,
-                         const uint16_t *blue)
-{
-  meta_kms_update_set_crtc_gamma (update, crtc, size, red, green, blue);
-}
-
 MetaKmsDevice *
 meta_kms_crtc_get_device (MetaKmsCrtc *crtc)
 {
diff --git a/src/backends/native/meta-kms-crtc.h b/src/backends/native/meta-kms-crtc.h
index fa99381992..824b5eec4b 100644
--- a/src/backends/native/meta-kms-crtc.h
+++ b/src/backends/native/meta-kms-crtc.h
@@ -47,13 +47,6 @@ G_DECLARE_FINAL_TYPE (MetaKmsCrtc, meta_kms_crtc,
                       META, KMS_CRTC,
                       GObject)
 
-void meta_kms_crtc_set_gamma (MetaKmsCrtc    *crtc,
-                              MetaKmsUpdate  *update,
-                              int             size,
-                              const uint16_t *red,
-                              const uint16_t *green,
-                              const uint16_t *blue);
-
 MetaKmsDevice * meta_kms_crtc_get_device (MetaKmsCrtc *crtc);
 
 const MetaKmsCrtcState * meta_kms_crtc_get_current_state (MetaKmsCrtc *crtc);
diff --git a/src/backends/native/meta-kms-update-private.h b/src/backends/native/meta-kms-update-private.h
index c5931003f2..8d67b3110d 100644
--- a/src/backends/native/meta-kms-update-private.h
+++ b/src/backends/native/meta-kms-update-private.h
@@ -111,13 +111,6 @@ void meta_kms_update_seal (MetaKmsUpdate *update);
 
 gboolean meta_kms_update_is_sealed (MetaKmsUpdate *update);
 
-void meta_kms_update_set_crtc_gamma (MetaKmsUpdate  *update,
-                                     MetaKmsCrtc    *crtc,
-                                     int             size,
-                                     const uint16_t *red,
-                                     const uint16_t *green,
-                                     const uint16_t *blue);
-
 void meta_kms_plane_assignment_set_rotation (MetaKmsPlaneAssignment *plane_assignment,
                                              uint64_t                rotation);
 
diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h
index fba90a7f76..71fc01271b 100644
--- a/src/backends/native/meta-kms-update.h
+++ b/src/backends/native/meta-kms-update.h
@@ -102,6 +102,13 @@ void meta_kms_update_mode_set (MetaKmsUpdate *update,
                                GList         *connectors,
                                MetaKmsMode   *mode);
 
+void meta_kms_update_set_crtc_gamma (MetaKmsUpdate  *update,
+                                     MetaKmsCrtc    *crtc,
+                                     int             size,
+                                     const uint16_t *red,
+                                     const uint16_t *green,
+                                     const uint16_t *blue);
+
 MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate          *update,
                                                        MetaKmsCrtc            *crtc,
                                                        MetaKmsPlane           *plane,
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
index 5f953f1cc9..aa3c927cb0 100644
--- a/src/backends/native/meta-monitor-manager-kms.c
+++ b/src/backends/native/meta-monitor-manager-kms.c
@@ -429,8 +429,7 @@ meta_monitor_manager_kms_set_crtc_gamma (MetaMonitorManager *manager,
   kms_update = meta_kms_ensure_pending_update (kms);
 
   kms_crtc = meta_crtc_kms_get_kms_crtc (META_CRTC_KMS (crtc));
-  meta_kms_crtc_set_gamma (kms_crtc, kms_update,
-                           size, red, green, blue);
+  meta_kms_update_set_crtc_gamma (kms_update, kms_crtc, size, red, green, blue);
 
   kms_feedback = meta_kms_post_pending_update_sync (kms);
   if (meta_kms_feedback_get_result (kms_feedback) != META_KMS_FEEDBACK_PASSED)


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