OpenGL show window performance is significantly slower than cairo
Steps to reproduce
Opening any window triggers this.
When showing a window I see a large difference in performance between OpenGL and cairo in GTK4. I ran my example with several configurations: i3 (X11) and picom, i3, and Gnome Wayland. I'm running an nvidia GPU with driver version 465.
With GSK_RENDERER=cairo the window is shown within 1-2ms regardless of my configuration.
With opengl on X11 with picom as a compositor it takes between 150 and 200ms. It improves to 60-100ms X11 without a compositor or gnome-wayland-session.
OpenGL also seems more prone to interference from other applications. At one point I was seeing very consistent 300+ms but it went away when I closed Firefox, which wasn't displaying any animations.
Which opengl renderer I pick, gl or ngl, doesn't seem to make an appreciable difference. Fedora has disabled the vulkan renderer so I can't easily compare them.
I think it's natural for opengl to regress slightly but 200ms is enough to be noticeable.
Fedora 34, GTK 4.2.1
I noticed this as a user after I ported one of my applications from gtk3 to gtk4 and it became noticeably slower to open. I'm not sure if this should be counted as a regression since opengl is the default now. GTK3 performs the same as GTK4 with the cairo renderer.