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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1899>
This commit is contained in:
Daniel van Vugt 2021-06-25 17:09:06 +08:00 committed by Marge Bot
parent 5702349c2d
commit af03314f20

View File

@ -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) {