[gnome-shell/gnome-40] magnifier: Avoid painting a desktop that's fully occluded by its clone



commit 17e9189bd6c15e1944852ef89c4ec9b16396750a
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Fri Jun 25 17:09:06 2021 +0800

    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/1982>

 js/ui/magnifier.js | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 8334794f3f..11fde37e2d 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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]