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

Proposed by Andrea Cimitan
Status: Rejected
Rejected by: Andrea Cimitan
Proposed branch: lp:~cimi/unity8/lp1350891_ScrollBackground
Merge into: lp:unity8
Diff against target: 89 lines (+11/-11)
4 files modified
qml/Dash/Dash.qml (+0/-5)
qml/Dash/DashBackground.qml (+4/-2)
qml/Dash/DashContent.qml (+0/-4)
qml/Dash/GenericScopeView.qml (+7/-0)
To merge this branch: bzr merge lp:~cimi/unity8/lp1350891_ScrollBackground
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Disapprove
Albert Astals Cid (community) Abstain
PS Jenkins bot (community) continuous-integration Needs Fixing
Gerry Boland Pending
Review via email: mp+255810@code.launchpad.net

This proposal supersedes a proposal from 2015-02-17.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
None
 * 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?
Need review.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

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
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

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
necessary?

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

review: Needs Fixing
Revision history for this message
Ying-Chun Liu (paulliu) wrote : Posted in a previous version of this proposal

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

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

You have bad tags, please run strip-tags.py

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
1440. By Andrea Cimitan

Removed colorBackground id

1441. By Andrea Cimitan

Show paper bg when colorBg is default or transparent

1442. By Andrea Cimitan

Added scaled versions

1443. By Andrea Cimitan

File renames

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

Tags have been fixed

review: Abstain
Revision history for this message
Andrea Cimitan (cimi) wrote :

Design just told me they change plans and background is fixed

review: Disapprove

Unmerged revisions

1443. By Andrea Cimitan

File renames

1442. By Andrea Cimitan

Added scaled versions

1441. By Andrea Cimitan

Show paper bg when colorBg is default or transparent

1440. By Andrea Cimitan

Removed colorBackground id

1439. By Andrea Cimitan

Deleted old assets

1438. By Andrea Cimitan

Merged trunk, minor changes

1437. By Ying-Chun Liu

Remove old DashBackground.

1436. By Ying-Chun Liu

Add suru background

1435. By Ying-Chun Liu

Merge trunk

1434. By Ying-Chun Liu

merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/Dash.qml'
2--- qml/Dash/Dash.qml 2015-02-17 08:26:20 +0000
3+++ qml/Dash/Dash.qml 2015-04-10 12:17:44 +0000
4@@ -197,11 +197,6 @@
5 }
6 }
7
8- DashBackground {
9- anchors.fill: scopeItem
10- visible: scopeItem.visible
11- }
12-
13 GenericScopeView {
14 id: scopeItem
15 objectName: "dashTempScopeItem"
16
17=== modified file 'qml/Dash/DashBackground.qml'
18--- qml/Dash/DashBackground.qml 2014-07-15 15:39:55 +0000
19+++ qml/Dash/DashBackground.qml 2015-04-10 12:17:44 +0000
20@@ -17,8 +17,10 @@
21 import QtQuick 2.0
22
23 Image {
24- source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
25- fillMode: Image.PreserveAspectCrop
26+ source: anchors.fill.width > anchors.fill.height ? "graphics/suru_scope_landscape.jpg" : "graphics/suru_scope_portrait.jpg"
27+ fillMode: Image.TileVertically
28 horizontalAlignment: Image.AlignRight
29 verticalAlignment: Image.AlignTop
30+ sourceSize.width: anchors.fill.width
31+ sourceSize.height: 0
32 }
33
34=== modified file 'qml/Dash/DashContent.qml'
35--- qml/Dash/DashContent.qml 2015-01-16 14:40:52 +0000
36+++ qml/Dash/DashContent.qml 2015-04-10 12:17:44 +0000
37@@ -103,10 +103,6 @@
38
39 anchors.fill: parent
40
41- DashBackground {
42- anchors.fill: parent
43- }
44-
45 ListView {
46 id: dashContentList
47 objectName: "dashContentList"
48
49=== modified file 'qml/Dash/GenericScopeView.qml'
50--- qml/Dash/GenericScopeView.qml 2015-03-13 10:07:57 +0000
51+++ qml/Dash/GenericScopeView.qml 2015-04-10 12:17:44 +0000
52@@ -157,6 +157,7 @@
53 }
54
55 Rectangle {
56+ id: colorBackground
57 anchors.fill: parent
58 color: scopeView.scopeStyle ? scopeView.scopeStyle.background : "transparent"
59 visible: color != "transparent"
60@@ -567,6 +568,12 @@
61 }
62 }
63
64+ DashBackground {
65+ anchors.fill: parent
66+ visible: !colorBackground.visible || colorBackground.color == "#f5f5f5"
67+ z: -1
68+ }
69+
70 sectionProperty: "name"
71 sectionDelegate: ListItems.Header {
72 objectName: "dashSectionHeader" + (delegate ? delegate.category : "")
73
74=== removed file 'qml/Dash/graphics/paper_landscape@27.png'
75Binary 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
76=== removed file 'qml/Dash/graphics/paper_portrait@27.png'
77Binary 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
78=== added file 'qml/Dash/graphics/suru_scope_landscape@13.jpg'
79Binary files qml/Dash/graphics/suru_scope_landscape@13.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_scope_landscape@13.jpg 2015-04-10 12:17:44 +0000 differ
80=== added file 'qml/Dash/graphics/suru_scope_landscape@18.jpg'
81Binary files qml/Dash/graphics/suru_scope_landscape@18.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_scope_landscape@18.jpg 2015-04-10 12:17:44 +0000 differ
82=== added file 'qml/Dash/graphics/suru_scope_landscape@27.jpg'
83Binary files qml/Dash/graphics/suru_scope_landscape@27.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_scope_landscape@27.jpg 2015-04-10 12:17:44 +0000 differ
84=== added file 'qml/Dash/graphics/suru_scope_portrait@13.jpg'
85Binary files qml/Dash/graphics/suru_scope_portrait@13.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_scope_portrait@13.jpg 2015-04-10 12:17:44 +0000 differ
86=== added file 'qml/Dash/graphics/suru_scope_portrait@18.jpg'
87Binary files qml/Dash/graphics/suru_scope_portrait@18.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_scope_portrait@18.jpg 2015-04-10 12:17:44 +0000 differ
88=== added file 'qml/Dash/graphics/suru_scope_portrait@27.jpg'
89Binary files qml/Dash/graphics/suru_scope_portrait@27.jpg 1970-01-01 00:00:00 +0000 and qml/Dash/graphics/suru_scope_portrait@27.jpg 2015-04-10 12:17:44 +0000 differ

Subscribers

People subscribed via source and target branches