loolwsd/DocumentBroker.cpp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-)
New commits: commit 99d0ee2ac111e7199626f6c17fb7ce723dac9126 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Fri Sep 2 07:29:59 2016 -0400 loolwsd: don't combine tiles by row to allow for better culling Change-Id: I30c0a9caad51bd77360a97c9f5899742385ccc27 Reviewed-on: https://gerrit.libreoffice.org/28615 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index 043218f..fe73d63 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -532,8 +532,7 @@ void DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined, Log::trace() << "TileCombined request for " << tileCombined.serialize() << Log::end; // Satisfy as many tiles from the cache. - // The rest, group by rows. - std::map<int, std::vector<TileDesc>> rows; + std::vector<TileDesc> tiles; for (auto& tile : tileCombined.getTiles()) { std::unique_ptr<std::fstream> cachedTile = _tileCache->lookupTile(tile); @@ -587,34 +586,16 @@ void DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined, } } - const auto tilePosY = tile.getTilePosY(); - auto it = rows.lower_bound(tilePosY); - if (it != rows.end()) - { - it->second.emplace_back(tile); - } - else - { - rows.emplace_hint(it, tilePosY, std::vector<TileDesc>({ tile })); - } + tiles.push_back(tile); } - if (rows.empty()) + for (auto& tile : tiles) { - // Done. - return; - } - - auto& tiles = tileCombined.getTiles(); - for (auto& row : rows) - { - tiles = row.second; - const auto tileMsg = tileCombined.serialize(); + const auto tileMsg = tile.serialize("tile "); Log::debug() << "TileCombined residual request for " << tileMsg << Log::end; // Forward to child to render. - const std::string request = "tilecombine " + tileMsg; - _childProcess->getWebSocket()->sendFrame(request.data(), request.size()); + _childProcess->getWebSocket()->sendFrame(tileMsg.data(), tileMsg.size()); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits