From a358f22346070481a26cf59b031f1b0a408b5ca3 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 30 Jul 2024 16:40:50 +0700 Subject: [PATCH] #4201 use the same options for all encoding functions cloning the options later meant that may_use_scrolling tagged the image with the boolean 'scroll' to indicate the scroll detection had already been used, but the flag was later lost and scroll detection would run again in some cases, comparing the current image with itself.. --- xpra/server/window/compress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpra/server/window/compress.py b/xpra/server/window/compress.py index 6a4ce5251d..60b7b931ca 100644 --- a/xpra/server/window/compress.py +++ b/xpra/server/window/compress.py @@ -2646,7 +2646,8 @@ def nodata(msg, *args) -> None: if self.suspended: return nodata("suspended") start = monotonic() - if SCROLL_ALL and self.may_use_scrolling(image, options): + tdoptions = typedict(options) + if SCROLL_ALL and self.may_use_scrolling(image, tdoptions): return nodata("used scrolling instead") end = monotonic() log("scroll detection took %ims", 1000*(end-start)) @@ -2671,7 +2672,6 @@ def nodata(msg, *args) -> None: if self.is_cancelled(sequence): return nodata("cancelled") raise RuntimeError(f"BUG: no encoder found for {coding!r} with options={options}") - tdoptions = typedict(options) try: ret = encoder(coding, image, tdoptions) except (TypeError, RuntimeError) as e: