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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 2014
Merged at revision: 2168
Proposed branch: lp:~aacid/unity8/dash_backgroud_source_size_rework
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/real_instead_of_var
Diff against target: 29 lines (+6/-2)
1 file modified
qml/Dash/DashBackground.qml (+6/-2)
To merge this branch: bzr merge lp:~aacid/unity8/dash_backgroud_source_size_rework
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+276157@code.launchpad.net

Commit message

Set the background source size to the max we'll need + new background

Solves async reloading and rescaling the image on every horizontal resize of the window

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No, i've set the prerequisite since it's a series i've been working on but if needed i can unchain the branches.

 * 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
Gerry Boland (gerboland) wrote :

Could be readonly, and a quick comment like
// avoids CPU scaling when window size changes
does no harm.

This will increase GPU memory pressure, but if that becomes an issue, we can pursue texture compression

review: Approve
Revision history for this message
Michał Sawicz (saviq) :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2010
http://jenkins.qa.ubuntu.com/job/unity8-ci/6598/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4926
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/13/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1310
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/13
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1205
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1206
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/12
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/12
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3956
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4923
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4923/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24709
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-mako/6/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/13
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/13/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24710

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6598/rebuild

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

readonly+comment

Revision history for this message
Albert Astals Cid (aacid) wrote :

> That kinda beats the change below... Don't think we can leave the above be, we need a square asset instead.
I agree with a square asset it'd be better but this patch still improves a lot the regular resizing case in which most of the times you're not changing the anchors.fill.width > anchors.fill.height condition

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2011
http://jenkins.qa.ubuntu.com/job/unity8-ci/6604/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4939
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/19/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1316
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/19
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1211
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1212
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/18
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/18
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3967
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4936
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4936/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24742
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-mako/10/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/19
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/19/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24741

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6604/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2011
http://jenkins.qa.ubuntu.com/job/unity8-ci/6622/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/4968
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/37/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1334
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/37
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1229
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1230
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/36
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/36
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/3990
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4965
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/4965/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24792
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-mako/25/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/37
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/37/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/24793

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6622/rebuild

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

merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
2013. By Albert Astals Cid

Merge

2014. By Albert Astals Cid

Use a square background provided by design

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2013
http://jenkins.qa.ubuntu.com/job/unity8-ci/6819/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5448
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/234/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1530
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/232
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1425
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1425
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/232
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/231
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4300
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5462
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5462/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25568
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/78/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/233
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/233/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25569

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6819/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2014
http://jenkins.qa.ubuntu.com/job/unity8-ci/6821/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5450
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/236/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1532
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/234
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1427
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1427
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/234/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/233
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4302
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5464
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5464/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25573
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/80/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/235
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/235/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25574

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6821/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Will do in silo
 * Did CI run pass? If not, please explain why.
Except for broken xenial AP :/
 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

I dislike that it's such a huge image. But the QML approach is sound

review: Approve
2015. By Albert Astals Cid

Merge

2016. By Albert Astals Cid

Use the thumbnailer to load the dash background

In the worst case (not in cache) we're a bit slower since we need to go through some extra steps for the resizing
but hopefully most of the cases the file will be in cache and we save the resizing on boot

2017. By Albert Astals Cid

no need for the substr

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/DashBackground.qml'
2--- qml/Dash/DashBackground.qml 2015-07-15 15:07:19 +0000
3+++ qml/Dash/DashBackground.qml 2015-12-18 09:05:46 +0000
4@@ -15,12 +15,16 @@
5 */
6
7 import QtQuick 2.4
8+import QtQuick.Window 2.2
9+import Ubuntu.Thumbnailer 0.1
10
11 Image {
12- source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
13+ source: "image://thumbnailer/" + Qt.resolvedUrl("graphics/paper.png")
14 fillMode: Image.PreserveAspectCrop
15 horizontalAlignment: Image.AlignRight
16 verticalAlignment: Image.AlignTop
17- sourceSize.width: anchors.fill.width
18+ // avoid CPU scaling when window size changes
19+ readonly property int maxSize: Math.max(Screen.width, Screen.height)
20+ sourceSize.width: maxSize
21 sourceSize.height: 0
22 }
23
24=== added file 'qml/Dash/graphics/paper.png'
25Binary files qml/Dash/graphics/paper.png 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/paper.png 2015-12-18 09:05:46 +0000 differ
26=== removed file 'qml/Dash/graphics/paper_landscape@27.png'
27Binary files qml/Dash/graphics/paper_landscape@27.png 2014-01-31 18:46:50 +0000 and qml/Dash/graphics/paper_landscape@27.png 1970-01-01 00:00:00 +0000 differ
28=== removed file 'qml/Dash/graphics/paper_portrait@27.png'
29Binary files qml/Dash/graphics/paper_portrait@27.png 2014-01-31 18:46:50 +0000 and qml/Dash/graphics/paper_portrait@27.png 1970-01-01 00:00:00 +0000 differ

Subscribers

People subscribed via source and target branches