From af03314f20dda315835537cf32f7ff212aa3d9fe Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Fri, 25 Jun 2021 17:09:06 +0800 Subject: [PATCH] magnifier: Avoid painting a desktop that's fully occluded by its clone This significantly reduces the render time for fullscreen zoom mode. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3305 Part-of: --- js/ui/magnifier.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 22581278d..180df2546 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -856,6 +856,7 @@ var ZoomRegion = class ZoomRegion { this._updateMousePosition(); this._connectSignals(); } else { + Main.uiGroup.set_opacity(255); this._disconnectSignals(); this._destroyActors(); } @@ -1404,6 +1405,9 @@ var ZoomRegion = class ZoomRegion { if (this.isActive() && this._isMouseOverRegion()) this._magnifier.hideSystemCursor(); + + const uiGroupIsOccluded = this.isActive() && this._isFullScreen(); + Main.uiGroup.set_opacity(uiGroupIsOccluded ? 0 : 255); } _changeROI(params) {