• Christophe Fergeau's avatar
    dcc: Fix QUIC fallback in get_compression_for_bitmap() · 48179332
    Christophe Fergeau authored
    There was a small regression introduced in get_compression_for_bitmap()
    by f401eb07 dcc: Rewrite dcc_image_compress.
    If SPICE_IMAGE_COMPRESSION_AUTO_GLZ is specified, and the bitmap has a
    stride which is bigger than its width (ie it has padding), then
    get_compression_for_bitmap() will return SPICE_IMAGE_COMPRESSION_OFF
    while in that case, we used to use QUIC for compression.
    
    This happens because that function in the AUTO_GLZ case first checks if
    QUIC should be used, if not, it decides to use GLZ, but then decides it
    can't because of the stride, so falls back to OFF, while it used to
    fall back to QUIC.
    
    This commit only slightly reworks a preexisting if (!can_lz_compress())
    check so that it's unconditional rather than depending on the previous
    checks having been unsuccessful.
    
    This issue could be observed by using a spice-html5 without support for
    uncompressed bitmaps with end-of-line padding by simply starting a f28
    VM and connecting to it/moving the mouse cursor in it.
    Signed-off-by: Christophe Fergeau's avatarChristophe Fergeau <cfergeau@redhat.com>
    Acked-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
    48179332
Name
Last commit
Last update
build-aux Loading commit data...
docs Loading commit data...
m4 Loading commit data...
server Loading commit data...
spice-common @ f82a6c53
tests Loading commit data...
tools Loading commit data...
uncrustify_cfg Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
GNUmakefile Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
TODO.multiclient Loading commit data...
autogen.sh Loading commit data...
cfg.mk Loading commit data...
configure.ac Loading commit data...
maint.mk Loading commit data...
spice-server.pc.in Loading commit data...