Commit Graph

6 Commits (master)

Author SHA1 Message Date
Michael Meeks a6678b554a Cleanup and shorten tilecombine descriptor lists.
If we have all default values of imgSize, wid, old-wid then we
should simply not serialize these out to save space and improve
readability.

Unfortunately, this means that we need to catch the mutation of
the TileCombined's content in two places; now just one. Building
the queue of rendered tiles to send back is now moved and
wrapped into a TileCombinedBuilder class - this also lets us
stop serialize taking a random vectors of TileDescs. However
the DocumentBroker::handleTileCombinedRequest method needs to
set the force-keyframe oldWid=0 flag on individual tiles and
then update the TileCombined.

Ideally we would have a nice visitor API and drop the non-const
getTiles() method that returns a reference to our internal vector.

Update tests, to not have redundant attributes, and add more tests
to ensure redundant attributes are removed.

Change-Id: Id76d3ae14d459d73bbae8112d840dea27f66588b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-26 19:28:30 +01:00
Michael Meeks 69c6739e47 cool#9145 - KitQueue: re-work _tileQueue to use TileDesc.
This stops a huge amount of parsing, re-parsing and conversion
from strings and back, making our few N^2 loops over the tiles
much more efficient.

Retain queue tests with the same strings via using a helper
to convert back to something expected.

Replace TileDesc::getId() with isPreview().

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If40fc45f1fb474d37371e4b949da5fdfc594fdc8
2024-05-23 19:50:09 +01:00
Michael Meeks 9eae552049 Split tile requests from the main incoming message stream.
Leave them as strings for now; this should be a pure re-factor.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibad2bc343afe3fe32ea729623f6b03575c7b0121
2024-05-23 19:50:09 +01:00
Michael Meeks 6f49f9398e Split outbound callback processing from incoming message queueing.
Now we always send callbacks as soon as possible back to wsd from the
kit. This has several implications:

1. even when InputProcessing is disabled we will send outbound
   progress updates.
2. we should send callbacks much more quickly without waiting for
   other queue events to be processed eg. tilecombine:

We also drastically simplify storage of callbacks, avoiding lots of
re-parsing of the same strings, and allow much more efficient
comparison and merging at a small space cost in queue size.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ia1ede5406767f895616a52775316ee6ab1c5db09
2024-05-09 17:47:15 +01:00
Michael Meeks 320606c225 KitQueue - remove more un-necessary code, and helper use.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic11db8ac1391bd22b4adcae40c99fa4ca99790f1
2024-05-09 17:47:15 +01:00
Michael Meeks ebb4eda3df Move common/MessageQueue.cpp -> kit/KitQueue.cpp.
This is not common code, it's used only in the Kit.

Rename TileQueue -> KitQueue as well as unhelpful member variable naming.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If158597f99f302cbc27e8eab139972f57a2fc3bb
2024-05-09 09:50:08 +01:00