loolwsd: always request newer tile version
And accept any version newer than expected. Since we have proper de-duplication of tiles requesting newer versions reduces changes of races between client and the renderer. Change-Id: I30bb53f98ef6f1461b53c1cf527d315dc35f7f26 Reviewed-on: https://gerrit.libreoffice.org/29125 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
9640fd1e78
commit
ae4a9f7110
2 changed files with 6 additions and 8 deletions
|
@ -510,14 +510,12 @@ void DocumentBroker::handleTileRequest(TileDesc& tile,
|
|||
return;
|
||||
}
|
||||
|
||||
if (tileCache().subscribeToTileRendering(tile, session) > 0)
|
||||
{
|
||||
Log::debug() << "Sending render request for tile (" << tile.getPart() << ',' << tile.getTilePosX() << ',' << tile.getTilePosY() << ")." << Log::end;
|
||||
tileCache().subscribeToTileRendering(tile, session);
|
||||
|
||||
// Forward to child to render.
|
||||
const std::string request = "tile " + tile.serialize();
|
||||
_childProcess->getWebSocket()->sendFrame(request.data(), request.size());
|
||||
}
|
||||
// Forward to child to render.
|
||||
Log::debug() << "Sending render request for tile (" << tile.getPart() << ',' << tile.getTilePosX() << ',' << tile.getTilePosY() << ")." << Log::end;
|
||||
const std::string request = "tile " + tile.serialize();
|
||||
_childProcess->getWebSocket()->sendFrame(request.data(), request.size());
|
||||
}
|
||||
|
||||
void DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
|
||||
|
|
|
@ -195,7 +195,7 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const
|
|||
}
|
||||
|
||||
// Remove subscriptions.
|
||||
if (tileBeingRendered->getVersion() == tile.getVersion())
|
||||
if (tileBeingRendered->getVersion() <= tile.getVersion())
|
||||
{
|
||||
Log::debug() << "STATISTICS: tile " << tile.getVersion() << " internal roundtrip "
|
||||
<< tileBeingRendered->getElapsedTimeMs() << " ms." << Log::end;
|
||||
|
|
Loading…
Reference in a new issue