[SDDM Theme] Set sourceSize on background image
Needs RevisionPublic

Authored by broulik on Jul 6 2018, 6:55 AM.

Details

Reviewers
davidedmundson
Group Reviewers
Plasma
Summary

I noticed that loading the background was a significant portion of sddm's startup time and found that we didn't set a sourceSize and just load a 3200x2000 image

Test Plan

Verified that the image isn't loaded multiple times due to changing sizes or property re-evaluation
Had to change anchors to manual width as anchors seem to set geometry separately in a later step where the image already started loading, with explicit width/height Image waits until they're set, so we load the image only once

Didn't really notice any impact on my machine but with 4K screen I would have loaded the full image anyway but might be noticeable on FHD or small laptops

Actually increases ram usage of sddm-greeter by 10 MiB here. I thought it would never load the image larger than it is? :/

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jul 6 2018, 6:55 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 6 2018, 6:55 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jul 6 2018, 6:55 AM
broulik edited the test plan for this revision. (Show Details)Jul 6 2018, 6:58 AM

Actually increases ram usage of sddm-greeter by 10 MiB here. I thought it would never load the image larger than it is? :/

It won't. Maybe you're testing wrong.

sddm-theme/Background.qml
37–38

no need to change this

41

Multiplying by devicePixelRatio seems wrong.

From QQuickImageBase:

d->pix.load(qmlEngine(this), loadUrl, d->sourcesize * d->devicePixelRatio, options, d->providerOptions);

but code there is a bit more complex

davidedmundson requested changes to this revision.Aug 28 2018, 10:44 AM

marking as requests info till I get a reply.

This revision now requires changes to proceed.Aug 28 2018, 10:44 AM