File: sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch

package info (click to toggle)
libsdl1.2 1.2.15%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,596 kB
  • sloc: ansic: 128,539; cpp: 11,192; sh: 9,887; asm: 2,553; objc: 2,128; makefile: 349; csh: 248; perl: 35; pascal: 8
file content (34 lines) | stat: -rw-r--r-- 1,304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Debian SDL packages maintainers
 <pkg-sdl-maintainers@lists.alioth.debian.org>
Date: Sun, 10 Jul 2022 11:19:26 +0100
Subject: Do not harness backing store by default

xorg-server 1.15 enables backing store if composite extension is enabled
(default settings). Harnessing backing store through compositor leads to
tearing effect.
This patch reverts default harnessing backing store to conditional use if
SDL_VIDEO_X11_BACKINGSTORE environment variable exists.

Origin: https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/1280665/comments/1
Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2383
Bug-Debian: https://bugs.debian.org/747168
---
 src/video/x11/SDL_x11video.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index 7e7d1b6..e8382d7 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -1088,10 +1088,8 @@ static int X11_CreateWindow(_THIS, SDL_Surface *screen,
 		}
 	}
 
-#if 0 /* This is an experiment - are the graphics faster now? - nope. */
 	if ( SDL_getenv("SDL_VIDEO_X11_BACKINGSTORE") )
-#endif
-	/* Cache the window in the server, when possible */
+	/* Cache the window in the server when possible, on request */
 	{
 		Screen *xscreen;
 		XSetWindowAttributes a;