loolwsd/TileCache.cpp | 10 +++------- loolwsd/TileCache.hpp | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-)
New commits: commit a04f75d515c619be9ba9f4300409ff53da1ab22e Author: Ashod Nakashian <[email protected]> Date: Wed Sep 21 18:48:14 2016 -0400 loolwsd: no need to return anything when subscribing to TileCache Change-Id: I7b8280bf150a74db243c17cea11afc40899c4c0d Reviewed-on: https://gerrit.libreoffice.org/29165 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp index 88ece86..d13400e 100644 --- a/loolwsd/TileCache.cpp +++ b/loolwsd/TileCache.cpp @@ -414,7 +414,7 @@ void TileCache::saveLastModified(const Timestamp& timestamp) } // FIXME: to be further simplified when we centralize tile messages. -int TileCache::subscribeToTileRendering(const TileDesc& tile, const std::shared_ptr<ClientSession> &subscriber) +void TileCache::subscribeToTileRendering(const TileDesc& tile, const std::shared_ptr<ClientSession> &subscriber) { assert(subscriber->getKind() == LOOLSession::Kind::ToClient); @@ -433,7 +433,7 @@ int TileCache::subscribeToTileRendering(const TileDesc& tile, const std::shared_ if (s.lock().get() == subscriber.get()) { Log::debug("Redundant request to subscribe on tile " + name); - return 0; + tileBeingRendered->setVersion(tile.getVersion()); } } @@ -446,10 +446,8 @@ int TileCache::subscribeToTileRendering(const TileDesc& tile, const std::shared_ if (std::chrono::duration_cast<std::chrono::milliseconds>(duration).count() > COMMAND_TIMEOUT_MS) { // Tile painting has stalled. Reissue. - return tileBeingRendered->getVersion(); + tileBeingRendered->setVersion(tile.getVersion()); } - - return 0; } else { @@ -463,8 +461,6 @@ int TileCache::subscribeToTileRendering(const TileDesc& tile, const std::shared_ tileBeingRendered = std::make_shared<TileBeingRendered>(cachedName, tile); tileBeingRendered->_subscribers.push_back(subscriber); _tilesBeingRendered[cachedName] = tileBeingRendered; - - return tileBeingRendered->getVersion(); } } diff --git a/loolwsd/TileCache.hpp b/loolwsd/TileCache.hpp index 322387d..fc0210b 100644 --- a/loolwsd/TileCache.hpp +++ b/loolwsd/TileCache.hpp @@ -40,7 +40,7 @@ public: /// Subscribes if no subscription exists and returns the version number. /// Otherwise returns 0 to signify a subscription exists. - int subscribeToTileRendering(const TileDesc& tile, const std::shared_ptr<ClientSession> &subscriber); + void subscribeToTileRendering(const TileDesc& tile, const std::shared_ptr<ClientSession> &subscriber); /// Cancels all tile requests by the given subscriber. std::string cancelTiles(const std::shared_ptr<ClientSession> &subscriber); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
