Batched loKit calls are now capped by time
to limit the maximum latency.
Change-Id: Ife354228f9837dbc4c2e4f216e7f9d85487bac14
Reviewed-on: https://gerrit.libreoffice.org/33423
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
User input is batched together to reduce
overheads. This initial implementation
will batch all input of the same type
together.
Change-Id: Ia0069de9cf5acecf637941543267f86518c04640
Reviewed-on: https://gerrit.libreoffice.org/33422
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Also do not segfault in the event.
Change-Id: I80c4c5c0d1d5f1a4cde9a6a3458f69a3df9dc647
Reviewed-on: https://gerrit.libreoffice.org/33140
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Since we have no control over when Core might
use the callback object, we should retain it
indefinetely. This is safer and has no impact.
Because Core uses a timer to flush callbacks,
it can issue the callbacks for a view after
it had been destroyed, thereby segfaulting.
Change-Id: I2ef87234d0b4dff83ded320b480abce53188fec4
Reviewed-on: https://gerrit.libreoffice.org/33116
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
When a new session is created in Kit, it means
a new view is about to be created. However if
in the interim the last session closes and
view is destroyed, Kit should not exit.
Instead, we unload the document and
prepare to reload it again.
Change-Id: Idbc3a663b4d6921440736499f2d439fc2b7e33dc
Reviewed-on: https://gerrit.libreoffice.org/33115
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The server tells the client the hash of each tile it sends (calculated
from the contents of the tile, not its PNG encoding). When the client
asks for a tile to be refreshed, it tells the server what the hash of
the existing tile is. If the server notices that the tile contents
hasn't actually changed, it doesn't PNG encode it and doesn't send it
to the client.
The intent is that this will reduce load on the server and also avoid
unnecessary tile traffic.
Change-Id: Ia06ca68655ea984ed4319f24f4470afda322eccf
Previously tilecombine had its own version, which is
nonesensical, since it's not really a tile.
Now it passes the version to the tiles when
parsing and serializes version per-tile.
Change-Id: I5db8d94880431e3d2a40b6787c6fe51a05771305
Reviewed-on: https://gerrit.libreoffice.org/32633
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
As far as I see, we tend to use the same namespace name as the
basename of the corresponding include file, and this stuff is defined
in a file called Png.hpp.
Change-Id: Id859e13e94568abd9f1d5b4ef3bfbbb0c156db11
There should be no need to take a lock to
access it. However there were cases where it
wasn't thread-safe. Now we can remove unncessary
locking before invoking it.
Change-Id: I90d2c6940610a59aa6c749491ea85fb80b0acbcd
Reviewed-on: https://gerrit.libreoffice.org/32615
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Since load() returns _loKitDocument, there is no
point in checking it again.
Change-Id: Ice511ba3f42cf9411918397a73497d3a07bbdfe5
Reviewed-on: https://gerrit.libreoffice.org/32607
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The _documentMutex used to be a member of _loKitDocument,
so it couldn't be locked when _loKitDocument was null.
However this has long since changed and is independent.
So no good reason not to lock it at every access point
of _loKitDocument, which is simpler and safer.
Change-Id: I82bdff5f94b5eaf68365d8cdb3ef5779e6c6cc87
Reviewed-on: https://gerrit.libreoffice.org/32606
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
By the time load() is invoked, _mutex is already
unlocked in onLoad(), so it is no longer safe
to access _sessions.
So we need to get the session and pass it to load.
Change-Id: I671647f6df4128b8595082af2355fbef33994cdd
Reviewed-on: https://gerrit.libreoffice.org/32601
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
and apply the nullptr plugin.
Lots of hacking in my LO tree required to make this work, will probably
end up needing to add an extra parameter to the LO side.
Change-Id: I02ae1dcdece9d9ddf05f7757f6696e3a5d7d1f14
Reviewed-on: https://gerrit.libreoffice.org/32339
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Tiles no longer hog the queue ahead of all else.
We now give priority to callback events, so clients
get to know the document state sooner.
Since tiles take long to render, an equal time
is given to non-tiles (capped at 100ms).
Finally, Impress preview tiles are given
the lowest priority and rendered only when
the queue is drained.
Change-Id: I922c1e11200e5675f50d86b83baee1588cbbf66f
Reviewed-on: https://gerrit.libreoffice.org/31394
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>