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.

commitba512d5467630590020754cafa38e511ec9e1e03 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 12 Apr 2016, 15:40 (11 years ago) parent3892902
4 files changed+14−5
qml/OrientedShell.qml+1−2 qml/Stages/AbstractStage.qml+8−3 qml/Stages/PhoneStage.qml+3 qml/Stages/TabletStage.qml+2
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+8−3
@@ -18,11 +18,9 @@ import QtQuick 2.4
1818import Ubuntu.Components 1.3
1919import GSettings 1.0
2020
21−Rectangle {
21+Item {
2222 id: root
2323
24− color: "#060606"
25−
2624 // Controls to be set from outside
2725 property bool altTabPressed
2826 property url background
@@ -42,6 +40,7 @@ Rectangle {
4240 property bool suspended
4341 // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
4442 property int leftMargin: 0
43+ property alias paintBackground: background.visible
4544
4645 // To be read from outside
4746 property var mainApp: null
@@ -70,4 +69,10 @@ Rectangle {
7069 }
7170 return false;
7271 }
72+
73+ Rectangle {
74+ id: background
75+ anchors.fill: parent
76+ color: "#060606"
77+ }
7378}
qml/Stages/PhoneStage.qml+3
@@ -32,6 +32,8 @@ AbstractStage {
3232 property real startScale: 1.1
3333 property real endScale: 0.7
3434
35+ paintBackground: spreadView.shiftedContentX !== 0
36+
3537 onBeingResizedChanged: {
3638 if (beingResized) {
3739 // Brace yourselves for impact!
@@ -324,6 +326,7 @@ AbstractStage {
324326 }
325327
326328 onShiftedContentXChanged: {
329+print("shiftedContent", shiftedContentX, "content", contentX)
327330 if (root.beingResized) {
328331 // Flickabe.contentX wiggles during resizes. Don't react to it.
329332 return;
qml/Stages/TabletStage.qml+2
@@ -30,6 +30,8 @@ AbstractStage {
3030 property alias sideStageVisible: spreadView.sideStageVisible
3131 property alias sideStageWidth: spreadView.sideStageWidth
3232
33+ paintBackground: spreadView.shiftedContentX !== 0
34+
3335 // Functions to be called from outside
3436 function updateFocusedAppOrientation() {
3537 var mainStageAppIndex = priv.indexOf(priv.mainStageAppId);