From d5ca429627865964a74be2ca7b2b4c825204cbbb Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 18 Jan 2024 13:45:18 +0000 Subject: [PATCH] wayland: consider every commit a "content update" for presentation time The protocol doesn't have a definition of what it means, but damage is a flawed interpretation. Color management changes are arguably content updates, so are viewporter changes, so are blur changes and so on. Also see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/36 for an upstream discussion of this --- src/wayland/surface.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wayland/surface.cpp b/src/wayland/surface.cpp index bffba92067..3b9aa9f3a7 100644 --- a/src/wayland/surface.cpp +++ b/src/wayland/surface.cpp @@ -578,9 +578,7 @@ void SurfaceState::mergeInto(SurfaceState *target) target->colorDescription = colorDescription; target->colorDescriptionIsSet = true; } - if (presentationFeedback) { - target->presentationFeedback = std::move(presentationFeedback); - } + target->presentationFeedback = std::move(presentationFeedback); *this = SurfaceState{}; serial = target->serial; @@ -607,9 +605,6 @@ void SurfaceInterfacePrivate::applyState(SurfaceState *next) const QRectF oldBufferSourceBox = bufferSourceBox; const QRegion oldInputRegion = inputRegion; - if (!next->damage.isEmpty() || !next->bufferDamage.isEmpty()) { - current->presentationFeedback.reset(); - } next->mergeInto(current.get()); bufferRef = current->buffer; scaleOverride = pendingScaleOverride;