Open rmader opened 1 year ago
Hi. Let me start with saying that I haven't tried if this is still an issue in GTK4 (not tested this anymore recently), but this (removing background) was done on purpose. Back then GTK4 renderer did not have any textures overlapping/visibility detection making it redraw background for each video frame. Removing background reduced time spend on GPU draws by almost half making it able to play videos at higher framerates on weak GPUs in especially fullscreen (tested on Atom z3785 tablet). So unless situation changed, the overhead on the GTK4 side (by redrawing fully covered app background for each frame) was much bigger then overhead on the compositor side.
Off, that sounds pretty bad - I couldn't find any gtk issue off-hand, do you recall if this was raised upstream?
do you recall if this was raised upstream?
Since I was able to workaround this by setting CSS background to "none", I kinda went with it then. I myself did not report this upstream under assumption that this is just how their renderer works. Did not expect "OPAQUE_REGION" flags to be unset by simply editing CSS :man_shrugging:
I will probably need to check if nowadays this performance problem is still there.
I assume the current behavior will break GtkGraphicsOffload
once that is implemented here (or at least make it inefficient), no?
I will try to tackle and test your issue together with implementing GtkGraphicsOffload
, which will be next thing to do after #374 is done and merged. Sorry it takes this long, but I have been really busy with reworking Clapper guts for a while.
In short: this is a performance issue that forces compositors like Mutter to do extra work when displaying the app. It can be tested in Gnome-Shell by
alt
+f2
->lg
-> "Flags" -> "OPAQUE_REGION".You'll see that the Clapper window will get a purple overlay, while it should have a green one. This might be related to a similar issue in Console.![image](https://user-images.githubusercontent.com/6313774/221417309-e4076a04-0c58-44a5-a324-d3243610bda2.png)
Would love to see it fixed :)
Related: