[Libreoffice-commits] online.git: wsd/ClientSession.cpp wsd/ClientSession.hpp wsd/TestStubs.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 22 21:21:08 UTC 2018
wsd/ClientSession.cpp | 5 +++--
wsd/ClientSession.hpp | 16 +++++++---------
wsd/TestStubs.cpp | 2 +-
3 files changed, 11 insertions(+), 12 deletions(-)
New commits:
commit 3ca4421eb73d17d8dc84fb46284d1746db078988
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Aug 22 23:20:27 2018 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Aug 22 23:20:27 2018 +0200
Updated deduplicated tiles wireID
Change-Id: Ia901d8831792de1bee6b21017be02fa1e744e2ee
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index b5494a539..4635bd57f 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1198,7 +1198,7 @@ void ClientSession::resetWireIdMap()
_oldWireIds.clear();
}
-void ClientSession::traceTileBySend(const TileDesc& tile)
+void ClientSession::traceTileBySend(const TileDesc& tile, bool deduplicated)
{
const std::string tileID = generateTileID(tile);
@@ -1220,7 +1220,8 @@ void ClientSession::traceTileBySend(const TileDesc& tile)
}
// Record that the tile is sent
- addTileOnFly(tile);
+ if (!deduplicated)
+ addTileOnFly(tile);
}
void ClientSession::traceSubscribeToTile(const std::string& cacheName)
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index bebf985e0..7e7fef7ab 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -86,15 +86,13 @@ public:
LOG_TRC(getName() << " enqueueing client message " << data->id());
size_t sizeBefore = _senderQueue.size();
size_t newSize = _senderQueue.enqueue(data);
- if(sizeBefore != newSize)
+
+ // Track sent tile
+ const std::string command = data->firstToken();
+ if (command == "tile:")
{
- // Track sent tile
- const std::string command = data->firstToken();
- if (command == "tile:")
- {
- const TileDesc tile = TileDesc::parse(data->firstLine());
- traceTileBySend(tile);
- }
+ const TileDesc tile = TileDesc::parse(data->firstLine());
+ traceTileBySend(tile, sizeBefore == newSize);
}
}
@@ -134,7 +132,7 @@ public:
/// This method updates internal data related to sent tiles (wireID and tiles-on-fly)
/// Call this method anytime when a new tile is sent to the client
- void traceTileBySend(const TileDesc& tile);
+ void traceTileBySend(const TileDesc& tile, bool deduplicated = false);
/// Trask tiles what we a subscription to
void traceSubscribeToTile(const std::string& tileCacheName);
diff --git a/wsd/TestStubs.cpp b/wsd/TestStubs.cpp
index 038c2f9de..af4231e5d 100644
--- a/wsd/TestStubs.cpp
+++ b/wsd/TestStubs.cpp
@@ -20,7 +20,7 @@
void DocumentBroker::assertCorrectThread() const {}
-void ClientSession::traceTileBySend(const TileDesc& /*tile*/) {}
+void ClientSession::traceTileBySend(const TileDesc& /*tile*/, bool /*deduplicated = false*/) {}
void ClientSession::traceSubscribeToTile(const std::string& /*tileCacheName*/) {};
More information about the Libreoffice-commits
mailing list