[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/ClientSession.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 1 10:42:23 UTC 2018
wsd/ClientSession.cpp | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 0726bdf1df4982febd6b0a7cba1c0736be0b488e
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Sep 26 22:16:11 2018 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Oct 1 12:42:04 2018 +0200
Don't send tiles which was changed outside of the visible area
Since this commit:
9473908d45a884827356b504c5f768e2f29cc46b
We can avoid that, because the tiles will be invalidated
on the client side and when the client visible area changes
the invalidated tiles are requested anyway.
(cherry picked from commit a1a0bf3718f5dff3996a3ace98a6a9cb0f10f55b)
Change-Id: I272e3b4b87380ae574c16a2b480dbc8caabf4b32
Reviewed-on: https://gerrit.libreoffice.org/61126
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index b097d5dd3..eb8414ff5 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1185,9 +1185,14 @@ void ClientSession::handleTileInvalidation(const std::string& message,
int part = result.first;
Util::Rectangle& invalidateRect = result.second;
+ // We can ignore the invalidation if it's outside of the visible area
+ if(!normalizedVisArea.intersects(invalidateRect))
+ return;
+
if( part == -1 ) // If no part is specifed we use the part used by the client
part = _clientSelectedPart;
+
std::vector<TileDesc> invalidTiles;
if(part == _clientSelectedPart || _isTextDocument)
{
More information about the Libreoffice-commits
mailing list