Merge lp:~mterry/unity8/sourceSizeBackground into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Michael Zanetti
Approved revision: 1290
Merged at revision: 1311
Proposed branch: lp:~mterry/unity8/sourceSizeBackground
Merge into: lp:unity8
Diff against target: 13 lines (+3/-0)
1 file modified
qml/Greeter/GreeterContent.qml (+3/-0)
To merge this branch: bzr merge lp:~mterry/unity8/sourceSizeBackground
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+236021@code.launchpad.net

Commit message

Limit how much memory we reserve for the greeter background image, allowing giant images to appear correctly.

The downside is that even if the image is smaller, we'll still reserve the whole screen size in memory. But we avoid the actual bug anyway.

Description of the change

Limit how much memory we reserve for the greeter background image, allowing giant images to appear correctly.

The downside is that even if the image is smaller, we'll still reserve the whole screen size in memory. But we avoid the actual bug anyway.

== Checklist ==

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 No

 * 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?
 NA

 * If you changed the UI, has there been a design review?
 NA

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

lgtm

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

yes

 * Did CI run pass? If not, please explain why.

distro broken atm :/

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote :

FWIW this isn't the correct fix. This will scale the image down to *fit* within a box defined by sourceSize. So if you have a landscape wallpaper displayed on a portrait phone, it will be scaled down to fit within the width and then scaled up again on the GPU and cropped to fill the phone.

Revision history for this message
Michał Sawicz (saviq) wrote :

This is really an Image component limitation (will file a QTBUG soon), but here's a workaround we applied on the scope results, that could be used here as well ~unity-team/unity8/croppedImageMinimumSourceSize.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Greeter/GreeterContent.qml'
2--- qml/Greeter/GreeterContent.qml 2014-08-19 12:55:10 +0000
3+++ qml/Greeter/GreeterContent.qml 2014-09-25 18:36:59 +0000
4@@ -47,6 +47,9 @@
5 topMargin: backgroundTopMargin
6 }
7 fillMode: Image.PreserveAspectCrop
8+ // Limit how much memory we'll reserve for this image
9+ sourceSize.height: height
10+ sourceSize.width: width
11 }
12
13 // See Shell.qml's backgroundSettings treatment for why we need a separate

Subscribers

People subscribed via source and target branches