[gnome-settings-daemon] color: Do not set the VCGT if the temperature has not changed



commit 36e220472f97036b4505ea73b36a3a968f27e14b
Author: Richard Hughes <richard hughsie com>
Date:   Wed Feb 1 15:54:44 2017 +0000

    color: Do not set the VCGT if the temperature has not changed
    
    Setting the gamma tables on all displays means calling into colord a few times
    over D-Bus and seting a few blobs of data to the hardware.

 plugins/color/gsd-color-state.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/color/gsd-color-state.c b/plugins/color/gsd-color-state.c
index a580633..8bb9090 100644
--- a/plugins/color/gsd-color-state.c
+++ b/plugins/color/gsd-color-state.c
@@ -177,6 +177,10 @@ gsd_color_state_set_temperature (GsdColorState *state, guint temperature)
 {
         GsdColorStatePrivate *priv = state->priv;
         g_return_if_fail (GSD_IS_COLOR_STATE (state));
+
+        if (priv->color_temperature == temperature)
+                return;
+
         priv->color_temperature = temperature;
         gcm_session_set_gamma_for_all_devices (state);
 }


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