diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-08-19 08:28:16 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2016-08-31 11:51:51 +0000 |
commit | ce7484ffff5ccb7c41975da1ac453c6cbd49531f (patch) | |
tree | c8ab736edda5fb1919de9fd5016ed2129be3d6c3 /desktop/inc/lib | |
parent | 6527b4073c72d3fdf2307a58a06023fe28fd9960 (diff) |
LOK: queue-up events while processing client calls
To prevent feedback effects and improve performance,
we now queue up events fired during the processing
of a client call on the LOK API.
This has the advantage of giving us a chance to
compress redundant events and to combine others
(where possible) into fewer ones.
Change-Id: I2f6ea12c5d85205e6495cb130f6a6262534b6bb2
Reviewed-on: https://gerrit.libreoffice.org/28311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'desktop/inc/lib')
-rw-r--r-- | desktop/inc/lib/init.hxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx index 815f1ac6b4da..da03cfaf8843 100644 --- a/desktop/inc/lib/init.hxx +++ b/desktop/inc/lib/init.hxx @@ -35,8 +35,16 @@ namespace desktop { virtual void Invoke() override; static void callback(const int type, const char* payload, void* data); void queue(const int type, const char* data); - void setPartTilePainting(const bool bPartPainting); - bool isPartTilePainting() const; + + /// When enabled events are queued but callback not invoked. + void setEventLatch(const bool bEventLatch) + { + m_bEventLatch = bEventLatch; + } + + bool isEventLatchOn() const { return m_bEventLatch; } + void setPartTilePainting(const bool bPartPainting) { m_bPartTilePainting = bPartPainting; } + bool isPartTilePainting() const { return m_bPartTilePainting; } private: void flush(); @@ -48,6 +56,7 @@ namespace desktop { LibreOfficeKitCallback m_pCallback; void *m_pData; bool m_bPartTilePainting; + bool m_bEventLatch; std::mutex m_mutex; }; |