! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Increase zoom refresh rate
Status:
RESOLVED: FIXED

Comments

Description Alistair Buxton 2019-05-12 16:59:42 CEST
Created attachment 8515 
Patch to make zooming refresh at 60 FPS

The compositor zoom refresh rate is currently hardcoded to 30 FPS. Attached patch increases it to 60 FPS. According to Moore's law, the average computer should be at least 4x faster than when I wrote this code, so it should be okay. ;)

There used to be some code to determine the refresh rate from XRandR (and divide it by 2) but it seems to have been removed. Is there another way to get that information?
Comment 1 Olivier Fourdan editbugs 2019-05-12 17:30:20 CEST
It's not the zoom refresh per se, it's just to recenter the zoom location.

The current value of 1000÷30 is already 33 (whereas G_PRIORITY_HIGH_IDLE is 100), I don't like having to poll the Xserver with a rountrip (XQueryPointer() implies an Xserver roundtrip) with this such a high priority... 

Unfortunately, we cannot avoid the poll/rountrip because clients may issue a grab on the pointer, so we cannot rely on motion notifications alone. But for me, the current value is already too high and I'd rather use throttled raw motion events to trigger the roundtrip.


So it's a NAK from me.
Comment 2 Olivier Fourdan editbugs 2019-05-12 17:31:19 CEST
Sorry, copy/paste failed. G_PRIORITY_HIGH_IDLE is 200, G_PRIORITY_HIGH_IDLE is 100 (3× the current value)
Comment 3 Olivier Fourdan editbugs 2019-05-12 18:39:52 CEST
As for using raw events and throttled recenter, XI2 is only optional so we cannot even rely on those being available... Meh.

Previously, your original patch was using the XRandr refresh rate ÷ 2, or 30 by default if not available.

But that XRandr code was removed along with  the removal of the unreliable and fake "vblank sync" in favor of XPresent or GLX.
Comment 4 Git Bot editbugs 2019-05-12 19:18:29 CEST
Olivier Fourdan referenced this bugreport in commit 0f29217475698540f4ea2dbfdae4e603f158afa5

common: Add API to get the refresh rate.

https://git.xfce.org/xfce/xfwm4/commit?id=0f29217475698540f4ea2dbfdae4e603f158afa5
Comment 5 Git Bot editbugs 2019-05-12 19:18:32 CEST
Olivier Fourdan referenced this bugreport in commit 9bba554180e230a928422e682aa840ad0c8db793

compositor: Base zoom update or refresh rate

https://git.xfce.org/xfce/xfwm4/commit?id=9bba554180e230a928422e682aa840ad0c8db793
Comment 6 Olivier Fourdan editbugs 2019-05-12 19:20:32 CEST
Those two commits should give the same as with 4.12 (i.e. half the refresh rate of the primary monitor)
Comment 7 Git Bot editbugs 2019-05-12 19:46:14 CEST
Alistair Buxton referenced this bugreport in commit 0a8f00c74dffc93900e7aae545c56a4eaa023f4b

compositor: Refresh the zoom at refresh rate

https://git.xfce.org/xfce/xfwm4/commit?id=0a8f00c74dffc93900e7aae545c56a4eaa023f4b
Comment 8 Olivier Fourdan editbugs 2019-05-12 19:47:04 CEST
Patch rebased and pushed.
Comment 9 Alistair Buxton 2019-05-12 20:04:38 CEST
Okay I'm a little bit confused about what just happened. :)

But panning is smoother now, so that's good...

Bug #15391

Reported by:
Alistair Buxton
Reported on: 2019-05-12
Last modified on: 2019-05-12

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Version:
unspecified

Attachments

Patch to make zooming refresh at 60 FPS (917 bytes, patch)
2019-05-12 16:59 CEST , Alistair Buxton
no flags

Additional information