on xenial help sign in
reduce some paint layers.

This will reduce overdraw by 2 layers when apps are focused, by 1 layer when in spread. Approved by: Michael Terry

commitc1a1961f9b420aac05103fd6f81c54b5b1782246 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 29 Apr 2016, 20:07 (10 years ago) parent986c383d600061
6 files changed+14−10
qml/OrientedShell.qml+1−2 qml/Stages/AbstractStage.qml+7−7 qml/Stages/DesktopStage.qml+1 qml/Stages/PhoneStage.qml+2 qml/Stages/ShimStage.qml−1 qml/Stages/TabletStage.qml+3
qml/OrientedShell.qml+1−2
@@ -26,9 +26,8 @@ import "Rotation"
2626// Workaround https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1473471
2727import Ubuntu.Components 1.3
2828
29−Rectangle {
29+Item {
3030 id: root
31− color: "black"
3231
3332 implicitWidth: units.gu(40)
3433 implicitHeight: units.gu(71)
qml/Stages/AbstractStage.qml+7−7
@@ -21,13 +21,6 @@ import GSettings 1.0
2121FocusScope {
2222 id: root
2323
24− property alias color: backRect.color
25− Rectangle {
26− id: backRect
27− color: "#060606"
28− anchors.fill: parent
29− }
30−
3124 // Controls to be set from outside
3225 property QtObject applicationManager
3326 property QtObject topLevelSurfaceList
@@ -49,6 +42,7 @@ FocusScope {
4942 property bool suspended
5043 // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
5144 property int leftMargin: 0
45+ property alias paintBackground: background.visible
5246
5347 // To be read from outside
5448 property var mainApp: null
@@ -77,4 +71,10 @@ FocusScope {
7771 }
7872 return false;
7973 }
74+
75+ Rectangle {
76+ id: background
77+ color: "#060606"
78+ anchors.fill: parent
79+ }
8080}
qml/Stages/DesktopStage.qml+1
@@ -26,6 +26,7 @@ import GlobalShortcut 1.0
2626AbstractStage {
2727 id: root
2828 anchors.fill: parent
29+ paintBackground: false
2930
3031 // functions to be called from outside
3132 function updateFocusedAppOrientation() { /* TODO */ }
qml/Stages/PhoneStage.qml+2
@@ -31,6 +31,8 @@ AbstractStage {
3131 property real startScale: 1.1
3232 property real endScale: 0.7
3333
34+ paintBackground: spreadView.shiftedContentX !== 0
35+
3436 onBeingResizedChanged: {
3537 if (beingResized) {
3638 // Brace yourselves for impact!
qml/Stages/ShimStage.qml−1
@@ -21,7 +21,6 @@ AbstractStage {
2121 id: shimStage
2222
2323 anchors.fill: parent
24− color: UbuntuColors.lightAubergine
2524
2625 Text {
2726 id: greeterModeText
qml/Stages/TabletStage.qml+3
@@ -34,6 +34,8 @@ AbstractStage {
3434 property int stageFocusedSurface: priv.focusedAppDelegate ? priv.focusedAppDelegate.stage : ApplicationInfoInterface.MainStage
3535 // </tutorial-hacks>
3636
37+ paintBackground: spreadView.shiftedContentX !== 0
38+
3739 // Functions to be called from outside
3840 function updateFocusedAppOrientation() {
3941 var mainStageIndex = root.topLevelSurfaceList.indexForId(priv.mainStageItemId);
@@ -746,6 +748,7 @@ AbstractStage {
746748 surface: model.surface
747749 closeable: !isDash
748750 highlightShown: root.altTabPressed && priv.highlightIndex == zIndex
751+ dropShadow: spreadView.active || priv.focusedAppDelegateIsDislocated
749752
750753 readonly property bool wantsMainStage: stage == ApplicationInfoInterface.MainStage
751754