From d309d7199ac72b0f61c70ad622ee7e9de3de9c2f Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 14 Jul 2023 21:51:36 +0100 Subject: deltas: fold the update: command back into an empty delta: command. Also: address parts of #6897, primarily: * remove the problematic aspect of bumping the last wid in our TileData, when this could trigger a re-send of a previously sent delta, causing tile corruption. * instead append an empty wid entry. * as an optimization - if the last entry is empty update the wid - since re-sending an empty delta is of no concern. * simplify a number of code-paths that special-case zero length deltas. All deltas now commence with 'D'. * still track updates in the JS - by detecting empty deltas. * shares more code and simplifies various paths. Signed-off-by: Michael Meeks Change-Id: I02af6d4b152524c201b6985b7a3497da7f08a517 --- kit/Delta.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kit/Delta.hpp') diff --git a/kit/Delta.hpp b/kit/Delta.hpp index 4f88540e42..da4803848c 100644 --- a/kit/Delta.hpp +++ b/kit/Delta.hpp @@ -450,8 +450,9 @@ class DeltaGenerator { { // The tile content is identical to what the client already has, so skip it LOG_TRC("Identical / un-changed tile"); - // Return a zero byte image to inform WSD we didn't need that. - // This allows WSD side TileCache to free up waiting subscribers. + // Return a zero length delta to inform WSD we didn't need that. + // This allows WSD side TileCache to send updates to waiting subscribers. + outStream.push_back('D'); return true; } -- cgit