Merge lp:~paulliu/unity8/lp1350891_ScrollBackground into lp:unity8

Proposed by Ying-Chun Liu
Status: Superseded
Proposed branch: lp:~paulliu/unity8/lp1350891_ScrollBackground
Merge into: lp:unity8
Diff against target: 57 lines (+8/-5)
3 files modified
qml/Dash/DashBackground.qml (+1/-1)
qml/Dash/DashContent.qml (+0/-4)
qml/Dash/GenericScopeView.qml (+7/-0)
To merge this branch: bzr merge lp:~paulliu/unity8/lp1350891_ScrollBackground
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Needs Fixing
Gerry Boland (community) Needs Fixing
Andrea Cimitan (community) Needs Information
Review via email:

This proposal has been superseded by a proposal from 2015-04-10.

Commit message

Scrollable Background

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 * Did you perform an exploratory manual test run of your code change and any related functionality?
 * Did you make sure that your branch does not contain spurious tags?
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 * If you changed the UI, has there been a design review?
Need review.

To post a comment you must log in.
1437. By Ying-Chun Liu on 2015-02-17

Remove old DashBackground.

Andrea Cimitan (cimi) wrote :

Looks like we will have one big image per each scope doing this way, wouldn't be better to have one single DashBackground somewhere in Dash.qml or where it could be static and not change? Would it be possible?

review: Needs Information
Gerry Boland (gerboland) wrote :

Qt is smart enough to cache the image, as long as its source size remains unchanged in the different instances, so there won't be duplication there.

Problems I see:
1. sourceSize is not being set on the image. This means Qt will upload the decoded RGB data to the GPU at the size of the image, and the GPU will have to scale it down to the screen resolution for _every_ frame. Please set the image sourceSize.

Also ensure the calculation is correct first time. If you make it a binding and the sourceSize changes, Qt will re-read the JPG and rescale it on the CPU - which destroys performance horribly.

2. When the sourceSize is set, the CPU has to read the JPG file and scale the image down to the sourceSize requested (about the screen resolution). For Kryllin, that's scaling 1080x1920 down to 540x960, which is a lot of work. Suspect would be better to supply a couple of pre-scaled images which Qt can choose from. Else we need mechanism to scale the image once and cache it somewhere for all future uses.

2. Why JPEG? it's a lossy format. PNG would be more visually accurate (but does have an alpha channel unlike JPEG, so may actually perform worse. Worth testing)

3. You should remove the unused images from the repo

4. There's a DashBackground in Dash.qml too, is it necessary now?

5. + id: colorBackground

Please carefully ensure graphical performance is not impact by this change.

review: Needs Fixing
Ying-Chun Liu (paulliu) wrote :

ok. I'll write a test case doing the scrolling.
And compare the user time diff before/after the patch.

Albert Astals Cid (aacid) wrote :

You have bad tags, please run

review: Needs Fixing

Unmerged revisions

1437. By Ying-Chun Liu on 2015-02-17

Remove old DashBackground.

1436. By Ying-Chun Liu on 2015-02-13

Add suru background

1435. By Ying-Chun Liu on 2015-02-13

Merge trunk

1434. By Ying-Chun Liu on 2014-11-27

merge trunk

1433. By Ying-Chun Liu on 2014-11-27

use inside flickable

1432. By Ying-Chun Liu on 2014-11-14

Scrolling background

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 2014-07-15 15:39:55 +0000
3+++ qml/Dash/DashBackground.qml 2015-02-17 14:42:11 +0000
4@@ -17,7 +17,7 @@
5 import QtQuick 2.0
7 Image {
8- source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
9+ source: anchors.fill.width > anchors.fill.height ? "graphics/suru_wp_1080x1920_landscape.jpg" : "graphics/suru_wp_1080x1920_portrait.jpg"
10 fillMode: Image.PreserveAspectCrop
11 horizontalAlignment: Image.AlignRight
12 verticalAlignment: Image.AlignTop
14=== modified file 'qml/Dash/DashContent.qml'
15--- qml/Dash/DashContent.qml 2015-01-16 14:40:52 +0000
16+++ qml/Dash/DashContent.qml 2015-02-17 14:42:11 +0000
17@@ -103,10 +103,6 @@
19 anchors.fill: parent
21- DashBackground {
22- anchors.fill: parent
23- }
25 ListView {
26 id: dashContentList
27 objectName: "dashContentList"
29=== modified file 'qml/Dash/GenericScopeView.qml'
30--- qml/Dash/GenericScopeView.qml 2015-02-11 17:10:44 +0000
31+++ qml/Dash/GenericScopeView.qml 2015-02-17 14:42:11 +0000
32@@ -156,6 +156,7 @@
33 }
35 Rectangle {
36+ id: colorBackground
37 anchors.fill: parent
38 color: scopeView.scopeStyle ? scopeView.scopeStyle.background : "transparent"
39 visible: color != "transparent"
40@@ -562,6 +563,12 @@
41 }
42 }
44+ DashBackground {
45+ anchors.fill: parent
46+ fillMode: Image.TileVertically
47+ z: -1
48+ }
50 sectionProperty: "name"
51 sectionDelegate: ListItems.Header {
52 objectName: "dashSectionHeader" + (delegate ? delegate.category : "")
54=== added file 'qml/Dash/graphics/suru_wp_1080x1920_landscape@27.jpg'
55Binary files qml/Dash/graphics/suru_wp_1080x1920_landscape@27.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_wp_1080x1920_landscape@27.jpg 2015-02-17 14:42:11 +0000 differ
56=== added file 'qml/Dash/graphics/suru_wp_1080x1920_portrait@27.jpg'
57Binary files qml/Dash/graphics/suru_wp_1080x1920_portrait@27.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_wp_1080x1920_portrait@27.jpg 2015-02-17 14:42:11 +0000 differ


People subscribed via source and target branches