wayland/surface: don't update preferred color description unless it changed

This avoids clients doing unnecessary work
This commit is contained in:
Xaver Hugl 2024-03-03 00:54:32 +01:00
parent 918ac8b27e
commit 3b28788592

View file

@ -1090,6 +1090,9 @@ const ColorDescription &SurfaceInterface::colorDescription() const
void SurfaceInterface::setPreferredColorDescription(const ColorDescription &descr)
{
if (d->preferredColorDescription == descr) {
return;
}
d->preferredColorDescription = descr;
if (d->frogColorManagement) {
d->frogColorManagement->setPreferredColorDescription(descr);