Skip to content

Commit

Permalink
#4307 only load 'mmap' module if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 26, 2024
1 parent 6a3eefd commit 8be5abb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xpra/client/gui/window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from typing import Any
from collections.abc import Callable, Iterable, Sequence

from xpra.net.mmap import mmap_read
from xpra.net import compression
from xpra.os_util import gi_import
from xpra.util.objects import typedict
Expand Down Expand Up @@ -852,6 +851,7 @@ def do_video_paint(self, coding: str, img, x: int, y: int, enc_width: int, enc_h
def paint_mmap(self, img_data, x: int, y: int, width: int, height: int, rowstride: int,
options: typedict, callbacks: PaintCallbacks) -> None:
assert self.mmap_enabled
from xpra.net.mmap import mmap_read
data, free_cb = mmap_read(self.mmap, *img_data)
callbacks.append(free_cb)
rgb_format = options.strget("rgb_format", "RGB")
Expand Down

0 comments on commit 8be5abb

Please sign in to comment.