mbox series

[v2,0/2] vnc: fix VNC artifacts

Message ID cover.1579582674.git.dirty@apple.com (mailing list archive)
Headers show
Series vnc: fix VNC artifacts | expand

Message

Zhijian Li (Fujitsu)" via Jan. 21, 2020, 5 a.m. UTC
Remove VNC optimization to reencode framebuffer update as raw if it's
smaller than the default encoding.  QEMU's implementation was naive and
didn't account for the ZLIB z_stream mutating with each compression.  Just
saving and restoring the output buffer offset wasn't sufficient to "rewind"
the previous encoding.  Considering that ZRLE is never larger than raw and
even though ZLIB can occasionally be fractionally larger than raw, the
overhead of implementing this optimization correctly isn't worth it.

While debugging this, I noticed ZRLE always compresses better than ZLIB.
Prioritize ZRLE over ZLIB, even if the client hints that ZLIB is preferred.

Cameron Esfahani (2):
  vnc: fix VNC artifacts
  vnc: prioritize ZRLE compression over ZLIB

 ui/vnc-enc-zrle.c |  4 ++--
 ui/vnc.c          | 31 +++++++++++--------------------
 2 files changed, 13 insertions(+), 22 deletions(-)