Feature #957
closedPre-scale icons so they don't need to be re-scaled each time they are displayed.
100%
Description
The icons won't change size after the launcher starts. So it seems helpful to pre-scale them once we know the canvas size.
The easiest way to do this is to simply scale them the first time they are displayed and save the updated image. The scaling is already being done. All that's needed to is to pass in the app_entry to do_drawing, and let the latter chose which icons to use, scaling them if not previously scaled.
A boolean is needed to know if the image has been scaled previously. It should be set to false when the image file is loaded and set to true after the icon has been scaled the first time.
The selected image (icon or splash image) depends on the platform id. Zero's and B's use the icon (it's smaller and scaling will be less taxing) while the 2's and 3's will use the splash image (since they have multiple cores and more memory).
Related issues
Updated by Hammel over 1 year ago
- Related to Bug #940: Colored icons are missing. added
Updated by Hammel over 1 year ago
- Due date set to 11 Nov 2021
- Start date changed from 15 Apr 2023 to 11 Nov 2021
- Follows Bug #872: Icons should be preloaded and prescaled added
Updated by Hammel over 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Updated by Hammel over 1 year ago
- % Done changed from 10 to 20
There is a lot of work to do here because there was lots of duplicate code used for scaling. The do_drawing routine also needs to select the image to use, not the callers which should be much simpler than they are.
Because this is a big change to improve performance and use colored icons where appropriate, the commits for this will need careful testing.
Updated by Hammel over 1 year ago
First pass at these changes are ready for testing. Need to try them on an RPi 3 first, which should display colored icons with these updates.
Updated by Hammel over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 20 to 100
RPi 2 and 3 are working quite well, with colored icons.
RPi 1 displays the Media Player correct with the updates.
Code is committed and pushed.
Closing issue.