diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-03-23 09:30:09 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-03-28 12:50:39 +0200 |
commit | a2b80d6ae7a4ad2df5db657c7e23aabf3df104e4 (patch) | |
tree | e74507a595c384a38ba72330ae6c1310319611c8 /common/rfb/EncodeManager.h | |
parent | 6b2f113b357c035d18b0d97b8fd1b74f8991b4d4 (diff) | |
download | tigervnc-a2b80d6ae7a4ad2df5db657c7e23aabf3df104e4.tar.gz tigervnc-a2b80d6ae7a4ad2df5db657c7e23aabf3df104e4.zip |
Limit lossless refresh update to safe size
We don't want to waste bandwidth on the lossless refresh if we might
need that bandwidth for a normal update. Try to estimate how much
data we can safely send without interfering.
Diffstat (limited to 'common/rfb/EncodeManager.h')
-rw-r--r-- | common/rfb/EncodeManager.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/rfb/EncodeManager.h b/common/rfb/EncodeManager.h index bdff04b1..a91c544e 100644 --- a/common/rfb/EncodeManager.h +++ b/common/rfb/EncodeManager.h @@ -53,7 +53,8 @@ namespace rfb { const RenderedCursor* renderedCursor); void writeLosslessRefresh(const Region& req, const PixelBuffer* pb, - const RenderedCursor* renderedCursor); + const RenderedCursor* renderedCursor, + size_t maxUpdateSize); protected: void doUpdate(bool allowLossy, const Region& changed, @@ -62,7 +63,7 @@ namespace rfb { const RenderedCursor* renderedCursor); void prepareEncoders(bool allowLossy); - Region getLosslessRefresh(const Region& req); + Region getLosslessRefresh(const Region& req, size_t maxUpdateSize); int computeNumRects(const Region& changed); |