Skip to content

Commit

Permalink
#2481: let the backing tell the window if it wants a list of rectangl…
Browse files Browse the repository at this point in the history
…es or just a single full window repaint

git-svn-id: https://xpra.org/svn/Xpra/trunk@24460 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 19, 2019
1 parent e354f68 commit 29952f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/xpra/client/client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
alphalog = Logger("alpha")


REPAINT_ALL = envbool("XPRA_REPAINT_ALL", False)
SIMULATE_MOUSE_DOWN = envbool("XPRA_SIMULATE_MOUSE_DOWN", True)
PROPERTIES_DEBUG = [x.strip() for x in os.environ.get("XPRA_WINDOW_PROPERTIES_DEBUG", "").split(",")]
AWT_DIALOG_WORKAROUND = envbool("XPRA_AWT_DIALOG_WORKAROUND", WIN32)
Expand Down Expand Up @@ -649,7 +648,7 @@ def draw_region(self, x, y, width, height, coding, img_data, rowstride, _packet_
return
#only register this callback if we actually need it:
if backing.draw_needs_refresh:
if not REPAINT_ALL:
if not backing.repaint_all:
self.pending_refresh.append((x, y, width, height))
if options.intget("flush", 0)==0:
callbacks.append(self.after_draw_refresh)
Expand All @@ -661,7 +660,7 @@ def after_draw_refresh(self, success, message=""):
backing = self._backing
if not backing:
return
if REPAINT_ALL or self._client.xscale!=1 or self._client.yscale!=1 or is_Wayland():
if backing.repaint_all or self._client.xscale!=1 or self._client.yscale!=1 or is_Wayland():
#easy: just repaint the whole window:
rw, rh = self.get_size()
self.idle_add(self.queue_draw_area, 0, 0, rw, rh)
Expand Down
4 changes: 4 additions & 0 deletions src/xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ def __init__(self, wid, window_alpha, pixel_depth=0):
self.bit_depth = self.get_bit_depth(pixel_depth)
self.init_formats()
self.draw_needs_refresh = DRAW_REFRESH
#the correct check would be this:
#self.repaint_all = self.is_double_buffered() or bw!=ww or bh!=wh
#but we're meant to be using double-buffered everywhere, so don't bother:
self.repaint_all = True
self._backing.show()

def init_gl_config(self, window_alpha):
Expand Down
2 changes: 2 additions & 0 deletions src/xpra/client/window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
PAINT_BOX = envint("XPRA_PAINT_BOX", 0) or envint("XPRA_OPENGL_PAINT_BOX", 0)
WEBP_PILLOW = envbool("XPRA_WEBP_PILLOW", False)
SCROLL_ENCODING = envbool("XPRA_SCROLL_ENCODING", True)
REPAINT_ALL = envbool("XPRA_REPAINT_ALL", False)


#ie:
Expand Down Expand Up @@ -128,6 +129,7 @@ def __init__(self, wid, window_alpha):
self.jpeg_decoder = get_codec("dec_jpeg")
self.webp_decoder = get_codec("dec_webp")
self.draw_needs_refresh = True
self.repaint_all = REPAINT_ALL
self.mmap = None
self.mmap_enabled = False

Expand Down

0 comments on commit 29952f5

Please sign in to comment.