Merge lp:~aacid/unity8/conciergeModeOptimization into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Andrea Cimitan
Approved revision: 2214
Merged at revision: 2413
Proposed branch: lp:~aacid/unity8/conciergeModeOptimization
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/cardArtShapeStyleOnCompileTime
Diff against target: 194 lines (+16/-41)
11 files modified
plugins/Dash/CardCreator.js (+16/-17)
tests/plugins/Dash/cardcreator/1.res (+0/-1)
tests/plugins/Dash/cardcreator/1.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/11.res (+0/-1)
tests/plugins/Dash/cardcreator/11.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/12.res (+0/-1)
tests/plugins/Dash/cardcreator/12.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/3.res (+0/-1)
tests/plugins/Dash/cardcreator/3.res.cardcreator (+0/-1)
tests/plugins/Dash/cardcreator/5.res (+0/-8)
tests/plugins/Dash/cardcreator/5.res.cardcreator (+0/-8)
To merge this branch: bzr merge lp:~aacid/unity8/conciergeModeOptimization
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Andrea Cimitan (community) Approve
Review via email: mp+288106@code.launchpad.net

Commit message

Concierge mode generated code optimization

No need to create a shape that will always be non visible

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
Prereq

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2213
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/600/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/334
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/334
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/334
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/791
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/808
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/808
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/805
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/805/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/805
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/805/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/805
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/805/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/805
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/805/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/805
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/805/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/805
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/805/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/600/rebuild

review: Needs Fixing (continuous-integration)
2214. By Albert Astals Cid

Merge

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2214
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/722/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/950
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/968/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/968
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/966/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/966
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/966/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/966
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/966/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/966
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/966/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/966/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/966
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/966/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/722/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
y
 * Did CI run pass? If not, please explain why.
not related
 * Did you make sure that the branch does not contain spurious tags?
y

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2214
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/827/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1074
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1089
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1089
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1087
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1087/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1087/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1087
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1087/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1087/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1087
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1087/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1087/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/827/rebuild

review: Needs Fixing (continuous-integration)
2215. By Albert Astals Cid

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/CardCreator.js'
--- plugins/Dash/CardCreator.js 2016-05-09 08:43:49 +0000
+++ plugins/Dash/CardCreator.js 2016-05-09 08:43:49 +0000
@@ -59,21 +59,17 @@
59 } \n\59 } \n\
60 }\n';60 }\n';
6161
62// %1 is the visible code62// %1 is the aspect of the UbuntuShape
63// %2 is the aspect of the UbuntuShape
64var kArtUbuntuShapeCode = 'UbuntuShape { \n\63var kArtUbuntuShapeCode = 'UbuntuShape { \n\
65 anchors.fill: parent; \n\64 anchors.fill: parent; \n\
66 visible: %1; \n\
67 source: artImage; \n\65 source: artImage; \n\
68 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\66 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\
69 radius: "medium"; \n\67 radius: "medium"; \n\
70 aspect: %2; \n\68 aspect: %1; \n\
71 }';69 }';
7270
73// %1 is the visible code
74var kArtProportionalShapeCode = 'ProportionalShape { \n\71var kArtProportionalShapeCode = 'ProportionalShape { \n\
75 anchors.fill: parent; \n\72 anchors.fill: parent; \n\
76 visible: %1; \n\
77 source: artImage; \n\73 source: artImage; \n\
78 aspect: UbuntuShape.DropShadow; \n\74 aspect: UbuntuShape.DropShadow; \n\
79 }';75 }';
@@ -520,18 +516,21 @@
520 fallbackURICode = 'decodeURI("%1")'.arg(fallback);516 fallbackURICode = 'decodeURI("%1")'.arg(fallback);
521 }517 }
522 var artShapeHolderShapeCode;518 var artShapeHolderShapeCode;
523 if (artShapeStyle === "icon") {519 if (!isConciergeMode) {
524 artShapeHolderShapeCode = kArtProportionalShapeCode.arg(isConciergeMode ? "false" : "true");520 if (artShapeStyle === "icon") {
521 artShapeHolderShapeCode = kArtProportionalShapeCode;
522 } else {
523 var artShapeHolderShapeAspect;
524 switch (artShapeStyle) {
525 case "inset": artShapeHolderShapeAspect = "UbuntuShape.Inset"; break;
526 case "shadow": artShapeHolderShapeAspect = "UbuntuShape.DropShadow"; break;
527 default:
528 case "flat": artShapeHolderShapeAspect = "UbuntuShape.Flat"; break;
529 }
530 artShapeHolderShapeCode = kArtUbuntuShapeCode.arg(artShapeHolderShapeAspect);
531 }
525 } else {532 } else {
526 var artShapeHolderShapeAspect;533 artShapeHolderShapeCode = "";
527 switch (artShapeStyle) {
528 case "inset": artShapeHolderShapeAspect = "UbuntuShape.Inset"; break;
529 case "shadow": artShapeHolderShapeAspect = "UbuntuShape.DropShadow"; break;
530 default:
531 case "flat": artShapeHolderShapeAspect = "UbuntuShape.Flat"; break;
532 }
533 artShapeHolderShapeCode = kArtUbuntuShapeCode.arg(isConciergeMode ? "false" : "true")
534 .arg(artShapeHolderShapeAspect);
535 }534 }
536 code += kArtShapeHolderCode.arg(artAnchors)535 code += kArtShapeHolderCode.arg(artAnchors)
537 .arg(widthCode)536 .arg(widthCode)
538537
=== modified file 'tests/plugins/Dash/cardcreator/1.res'
--- tests/plugins/Dash/cardcreator/1.res 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/1.res 2016-05-09 08:43:49 +0000
@@ -31,7 +31,6 @@
31 readonly property alias image: artImage;31 readonly property alias image: artImage;
32 UbuntuShape {32 UbuntuShape {
33 anchors.fill: parent;33 anchors.fill: parent;
34 visible: true;
35 source: artImage;34 source: artImage;
36 sourceFillMode: UbuntuShape.PreserveAspectCrop;35 sourceFillMode: UbuntuShape.PreserveAspectCrop;
37 radius: "medium";36 radius: "medium";
3837
=== modified file 'tests/plugins/Dash/cardcreator/1.res.cardcreator'
--- tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/1.res.cardcreator 2016-05-09 08:43:49 +0000
@@ -30,7 +30,6 @@
30 readonly property alias image: artImage;30 readonly property alias image: artImage;
31 UbuntuShape {31 UbuntuShape {
32 anchors.fill: parent;32 anchors.fill: parent;
33 visible: true;
34 source: artImage;33 source: artImage;
35 sourceFillMode: UbuntuShape.PreserveAspectCrop;34 sourceFillMode: UbuntuShape.PreserveAspectCrop;
36 radius: "medium";35 radius: "medium";
3736
=== modified file 'tests/plugins/Dash/cardcreator/11.res'
--- tests/plugins/Dash/cardcreator/11.res 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/11.res 2016-05-09 08:43:49 +0000
@@ -69,7 +69,6 @@
69 readonly property alias image: artImage; 69 readonly property alias image: artImage;
70 UbuntuShape {70 UbuntuShape {
71 anchors.fill: parent;71 anchors.fill: parent;
72 visible: true;
73 source: artImage;72 source: artImage;
74 sourceFillMode: UbuntuShape.PreserveAspectCrop;73 sourceFillMode: UbuntuShape.PreserveAspectCrop;
75 radius: "medium";74 radius: "medium";
7675
=== modified file 'tests/plugins/Dash/cardcreator/11.res.cardcreator'
--- tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/11.res.cardcreator 2016-05-09 08:43:49 +0000
@@ -68,7 +68,6 @@
68 readonly property alias image: artImage; 68 readonly property alias image: artImage;
69 UbuntuShape {69 UbuntuShape {
70 anchors.fill: parent;70 anchors.fill: parent;
71 visible: true;
72 source: artImage;71 source: artImage;
73 sourceFillMode: UbuntuShape.PreserveAspectCrop;72 sourceFillMode: UbuntuShape.PreserveAspectCrop;
74 radius: "medium";73 radius: "medium";
7574
=== modified file 'tests/plugins/Dash/cardcreator/12.res'
--- tests/plugins/Dash/cardcreator/12.res 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/12.res 2016-05-09 08:43:49 +0000
@@ -31,7 +31,6 @@
31 readonly property alias image: artImage;31 readonly property alias image: artImage;
32 UbuntuShape {32 UbuntuShape {
33 anchors.fill: parent;33 anchors.fill: parent;
34 visible: true;
35 source: artImage;34 source: artImage;
36 sourceFillMode: UbuntuShape.PreserveAspectCrop;35 sourceFillMode: UbuntuShape.PreserveAspectCrop;
37 radius: "medium";36 radius: "medium";
3837
=== modified file 'tests/plugins/Dash/cardcreator/12.res.cardcreator'
--- tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/12.res.cardcreator 2016-05-09 08:43:49 +0000
@@ -30,7 +30,6 @@
30 readonly property alias image: artImage;30 readonly property alias image: artImage;
31 UbuntuShape {31 UbuntuShape {
32 anchors.fill: parent;32 anchors.fill: parent;
33 visible: true;
34 source: artImage;33 source: artImage;
35 sourceFillMode: UbuntuShape.PreserveAspectCrop;34 sourceFillMode: UbuntuShape.PreserveAspectCrop;
36 radius: "medium";35 radius: "medium";
3736
=== modified file 'tests/plugins/Dash/cardcreator/3.res'
--- tests/plugins/Dash/cardcreator/3.res 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/3.res 2016-05-09 08:43:49 +0000
@@ -31,7 +31,6 @@
31 readonly property alias image: artImage;31 readonly property alias image: artImage;
32 ProportionalShape {32 ProportionalShape {
33 anchors.fill: parent;33 anchors.fill: parent;
34 visible: true;
35 source: artImage;34 source: artImage;
36 aspect: UbuntuShape.DropShadow;35 aspect: UbuntuShape.DropShadow;
37 }36 }
3837
=== modified file 'tests/plugins/Dash/cardcreator/3.res.cardcreator'
--- tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/3.res.cardcreator 2016-05-09 08:43:49 +0000
@@ -30,7 +30,6 @@
30 readonly property alias image: artImage;30 readonly property alias image: artImage;
31 ProportionalShape {31 ProportionalShape {
32 anchors.fill: parent;32 anchors.fill: parent;
33 visible: true;
34 source: artImage;33 source: artImage;
35 aspect: UbuntuShape.DropShadow;34 aspect: UbuntuShape.DropShadow;
36 }35 }
3736
=== modified file 'tests/plugins/Dash/cardcreator/5.res'
--- tests/plugins/Dash/cardcreator/5.res 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/5.res 2016-05-09 08:43:49 +0000
@@ -29,14 +29,6 @@
29 objectName: "artShape";29 objectName: "artShape";
30 visible: image.status == Image.Ready;30 visible: image.status == Image.Ready;
31 readonly property alias image: artImage;31 readonly property alias image: artImage;
32 UbuntuShape {
33 anchors.fill: parent;
34 visible: false;
35 source: artImage;
36 sourceFillMode: UbuntuShape.PreserveAspectCrop;
37 radius: "medium";
38 aspect: UbuntuShape.DropShadow;
39 }
40 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;32 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
41 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;33 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
42 Component.onCompleted: { updateWidthHeightBindings(); }34 Component.onCompleted: { updateWidthHeightBindings(); }
4335
=== modified file 'tests/plugins/Dash/cardcreator/5.res.cardcreator'
--- tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-09 08:43:49 +0000
+++ tests/plugins/Dash/cardcreator/5.res.cardcreator 2016-05-09 08:43:49 +0000
@@ -28,14 +28,6 @@
28 objectName: "artShape";28 objectName: "artShape";
29 visible: image.status == Image.Ready;29 visible: image.status == Image.Ready;
30 readonly property alias image: artImage;30 readonly property alias image: artImage;
31 UbuntuShape {
32 anchors.fill: parent;
33 visible: false;
34 source: artImage;
35 sourceFillMode: UbuntuShape.PreserveAspectCrop;
36 radius: "medium";
37 aspect: UbuntuShape.DropShadow;
38 }
39 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;31 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
40 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;32 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : 1;
41 Component.onCompleted: { updateWidthHeightBindings(); }33 Component.onCompleted: { updateWidthHeightBindings(); }

Subscribers

People subscribed via source and target branches