monitor-manager-native: Do not reload all the monitors on gamma-only change

If only gamma changed on drm CRTC's we don't have to rebuild the whole
monitors, nor to inform the backed about, the only consumer could be the
DBus API, and so we still emit a signal, but nothing else is needed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1964>
This commit is contained in:
Marco Trevisan (Treviño) 2021-03-21 23:11:24 +01:00 committed by Marge Bot
parent a8d11161b6
commit 9ce3abad28

View File

@ -65,6 +65,8 @@
#include "meta/main.h" #include "meta/main.h"
#include "meta/meta-x11-errors.h" #include "meta/meta-x11-errors.h"
#include "meta-dbus-display-config.h"
enum enum
{ {
PROP_0, PROP_0,
@ -514,6 +516,12 @@ on_kms_resources_changed (MetaKms *kms,
{ {
g_assert (changes != META_KMS_UPDATE_CHANGE_NONE); g_assert (changes != META_KMS_UPDATE_CHANGE_NONE);
if (changes == META_KMS_UPDATE_CHANGE_GAMMA)
{
meta_dbus_display_config_emit_monitors_changed (manager->display_config);
return;
}
handle_hotplug_event (manager); handle_hotplug_event (manager);
} }