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
This commit is contained in:
Xaver Hugl 2024-01-18 13:45:18 +00:00
parent da4f4d7e69
commit d5ca429627

View file

@ -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;