Robin Candau pushed to branch main at Arch Linux / Packaging / Packages / picom


Commits:
01fe09e8 by Robin Candau at 2024-01-25T14:55:14+01:00
upgpkg: 11-4: Add a patch to revert the upstream commit creating/facilitating 
freezes with vsync
See https://github.com/yshui/picom/issues/1166#issuecomment-1909584584

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + xrender-rollback-pixmap-region.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = picom
        pkgdesc = X compositor that may fix tearing issues
        pkgver = 11
-       pkgrel = 3
+       pkgrel = 4
        url = https://github.com/yshui/picom
        arch = x86_64
        license = MPL-2.0 AND MIT
@@ -27,7 +27,9 @@ pkgbase = picom
        optdepends = xorg-xwininfo: for picom-trans
        backup = etc/xdg/picom.conf
        source = 
git+https://github.com/yshui/picom?signed#commit=197b4bd396590cb5df61eb54ec6a1dadf1115a5d
+       source = xrender-rollback-pixmap-region.patch
        validpgpkeys = A22F5C0F4FCF9C7C89A167462C965E9E5D45D730
        b2sums = SKIP
+       b2sums = 
c35ac19b1931697ba5f2fac36afba74712af3534c9e534e48fd11a8bd26b70e2a8a49075e2aec6043618ad806ad5dc79556c053b810e6b0da6bf43f762b3258e
 
 pkgname = picom


=====================================
PKGBUILD
=====================================
@@ -6,7 +6,7 @@
 
 pkgname=picom
 pkgver=11
-pkgrel=3
+pkgrel=4
 pkgdesc='X compositor that may fix tearing issues'
 arch=(x86_64)
 url='https://github.com/yshui/picom'
@@ -19,9 +19,11 @@ optdepends=('dbus:          for controlling picom via D-Bus'
             'python:        for running picom-convgen.py'
             'xorg-xprop:    for picom-trans'
             'xorg-xwininfo: for picom-trans')
-source=("git+$url?signed#commit=197b4bd396590cb5df61eb54ec6a1dadf1115a5d") # 
tag: v11
+source=("git+$url?signed#commit=197b4bd396590cb5df61eb54ec6a1dadf1115a5d"
+        "xrender-rollback-pixmap-region.patch")
 validpgpkeys=('A22F5C0F4FCF9C7C89A167462C965E9E5D45D730') # Yuxuan Shui 
<yshu...@gmail.com>
-b2sums=('SKIP')
+b2sums=('SKIP'
+        
'c35ac19b1931697ba5f2fac36afba74712af3534c9e534e48fd11a8bd26b70e2a8a49075e2aec6043618ad806ad5dc79556c053b810e6b0da6bf43f762b3258e')
 
 prepare() {
   cd $pkgname
@@ -30,11 +32,10 @@ prepare() {
   setconf picom.sample.conf 'inactive-opacity=0.95;'
   # Improve performance (recommended option)
   setconf -u picom.sample.conf 'glx-no-stencil=true;'
-  # Switch the default backend to glx temporarily
-  # The xrender backend causes freezes when used with the vsync option enabled 
on some GPU intensive tasks with picom v11 (such as video playback or resources 
intensive video games)
+
+  # Temporary patch to rollback this upstream commit which produces freezes 
with the xrender backend when vsync is enabled: 
https://github.com/yshui/picom/commit/23a29470e50ef1d68b9c99186b069659a793184c
   # See https://github.com/yshui/picom/issues/1166
-  sed -i '/backend\ =\ "xrender";/d' picom.sample.conf
-  setconf -u picom.sample.conf 'backend="glx";'
+  patch -Np1 <${srcdir}/xrender-rollback-pixmap-region.patch
 }
 
 build() {


=====================================
xrender-rollback-pixmap-region.patch
=====================================
@@ -0,0 +1,22 @@
+diff --git a/src/backend/xrender/xrender.c b/src/backend/xrender/xrender.c
+index b2ec3f2..d7b41c8 100644
+--- a/src/backend/xrender/xrender.c
++++ b/src/backend/xrender/xrender.c
+@@ -624,16 +624,13 @@ static void present(backend_t *base, const region_t 
*region) {
+                                    XCB_NONE, xd->back[xd->curr_back], orig_x, 
orig_y, 0,
+                                    0, orig_x, orig_y, region_width, 
region_height);
+ 
+-              auto xregion = x_create_region(base->c, region);
+-
+               // Make sure we got reply from PresentPixmap before waiting for 
events,
+               // to avoid deadlock
+               auto e = xcb_request_check(
+                   base->c->c, xcb_present_pixmap_checked(
+                                   xd->base.c->c, xd->target_win,
+-                                  xd->back_pixmap[xd->curr_back], 0, 
XCB_NONE, xregion, 0,
++                                  xd->back_pixmap[xd->curr_back], 0, 
XCB_NONE, XCB_NONE, 0,
+                                   0, XCB_NONE, XCB_NONE, XCB_NONE, 0, 0, 0, 
0, 0, NULL));
+-              x_destroy_region(base->c, xregion);
+               if (e) {
+                       log_error("Failed to present pixmap");
+                       free(e);



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/picom/-/commit/01fe09e8a6c3b27510eb7e38c35bdaf1028c609f

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/picom/-/commit/01fe09e8a6c3b27510eb7e38c35bdaf1028c609f
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to