loolwsd/TileCache.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
New commits: commit 87a9f6e166e1cf487eb7497b4abcb65b30821b7a Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Tue Sep 20 21:40:28 2016 -0400 loolwsd: don't remove subscriptions on invalidation Tile invalidation is a hint to the clients to request fresh tiles and replace the existing ones. However any outstanding tile request will be rendered anew. So no need to remove those. Nonetheless, we should issue new versions to avoid race between old tile and invalidate. This can happen when a tile rendered just before invalidate reaches the client after the invalidate. The client will think the tile is a new one when it was rendered just before the invalidate. Change-Id: Ieb2ffab1214dd904da8e532e7d9d20e6ad783b78 Reviewed-on: https://gerrit.libreoffice.org/29123 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp index a439a63..eb8e8d8 100644 --- a/loolwsd/TileCache.cpp +++ b/loolwsd/TileCache.cpp @@ -202,6 +202,10 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const _tilesBeingRendered.erase(cachedName); } } + else + { + Log::debug("No subscribers for: " + cachedName); + } } std::string TileCache::getTextFile(const std::string& fileName) @@ -312,21 +316,6 @@ void TileCache::invalidateTiles(int part, int x, int y, int width, int height) } } } - - // Forget this tile as it will have to be rendered again. - for (auto it = _tilesBeingRendered.begin(); it != _tilesBeingRendered.end(); ) - { - const std::string cachedName = it->first; - if (intersectsTile(cachedName, part, x, y, width, height)) - { - Log::debug("Removing subscriptions for: " + cachedName); - it = _tilesBeingRendered.erase(it); - } - else - { - ++it; - } - } } void TileCache::invalidateTiles(const std::string& tiles) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits