Performance: add option to disable window shadows

Rendering window shadows in GTK4 doubles GPU usage. This commit adds an option to disable them for performance gain (useful on low-end devices).
This commit is contained in:
Rafostar
2020-11-13 19:26:49 +01:00
parent 4413fdb8a2
commit f660d900ba
8 changed files with 68 additions and 13 deletions

View File

@@ -206,8 +206,8 @@ class ClapperControls extends Gtk.Box
if(checkButton.activeId < 0) {
/* Disabling video leaves last frame frozen,
* so we hide it by making it transparent */
if(checkButton.type === 'video')
clapperWidget.player.widget.set_opacity(0);
//if(checkButton.type === 'video')
// clapperWidget.player.widget.set_opacity(0);
return clapperWidget.player[
`set_${checkButton.type}_track_enabled`
@@ -219,8 +219,8 @@ class ClapperControls extends Gtk.Box
clapperWidget.player[setTrack](checkButton.activeId);
clapperWidget.player[`${setTrack}_enabled`](true);
if(checkButton.type === 'video' && !clapperWidget.player.widget.opacity)
clapperWidget.player.widget.set_opacity(1);
//if(checkButton.type === 'video' && !clapperWidget.player.widget.opacity)
// clapperWidget.player.widget.set_opacity(1);
}
_handleVisualizationChange(checkButton)