Gnome cheats in fullscreen benchmarks (gives smaller than requested window)
Setup:
- FullHD monitor (1920x1080 resolution)
- Ubuntu 18.04 with Gnome/mutter 3.28.1, on top of X
- GfxBench benchmark suite from Kishonti: https://gfxbench.com/ (one of the most common 3D benchmarks supporting Linux)
Example test-case:
- bin/testfw_app --gfx glfw --gl_api desktop_core --width 1920 --height 1080 --fullscreen 1 --test_id gl_manhattan
Expected outcome:
- Benchmark renders always in full monitor resolution, like happens with all other desktops (Unity, XFCE, KDE)
Actual outcome:
- There's a black bar at the top of the screen and benchmark content is vertically scaled to smaller size
Same thing happens also with Ubuntu 16.04 version of Mutter (v3.18.3), so this isn't a new issue.
I assume that any other similar test-case which:
- requests full resolution fullscreen window
- uses window size that it gets from the WM
- but doesn't support resizing the window afterwards
Would have the same issue.
From xwininfo, xev and apitrace output I can see following:
- Window is created in correct resolution
- app sets some window properties
- WM reparents it
- WM maps window's parent to screen
- WM resizes window's parent a smaller size
- I think this is the point when the application thinks that's the final window size and sets its GL viewport accordingly
- Some _NET_WM properties are set by WM
- WM resizes window's parent back to correct size, which is apparently too late for this application
When comparing this to what Unity does:
- Unity or app sets properties after reparenting
- There's an extra intermediate window between the resized parent and the benchmark window
- Resizing of the parent window to smaller size happens before that window is mapped on screen. I assume this means that the application doesn't get window resize event for the wrong window size
- extra _NET_WM properties are set after parent is re-sized back to correct size -> this probably makes the time window with wrong window size shorter
Edited by Ghost User