After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774402 - Improve cover scaling to app/output scale factor.
Improve cover scaling to app/output scale factor.
Status: RESOLVED OBSOLETE
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks: 778870
 
 
Reported: 2016-11-14 12:40 UTC by Carlos Garnacho
Modified: 2018-01-10 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
albumartcache: Pass widget to figure out scaling (6.65 KB, patch)
2016-11-14 12:40 UTC, Carlos Garnacho
reviewed Details | Review
albumartcache: Create surface right away with the correct scale (2.29 KB, patch)
2016-11-14 12:40 UTC, Carlos Garnacho
needs-work Details | Review

Description Carlos Garnacho 2016-11-14 12:40:07 UTC
Right now gnome-music is doing a cairo->pixbuf->cairo conversion on every cover just to get a cairo surface with the right scale factor applied. This can be improved by using Gdk.Window.create_similar_image_surface(), so the first cairo surface has already the right device scale.

Patches coming.
Comment 1 Carlos Garnacho 2016-11-14 12:40:52 UTC
Created attachment 339794 [details] [review]
albumartcache: Pass widget to figure out scaling

We will need windowing resources when creating surfaces with the
right device scale. So far, pass a widget, and figure out the
scale factor out of it.
Comment 2 Carlos Garnacho 2016-11-14 12:40:59 UTC
Created attachment 339795 [details] [review]
albumartcache: Create surface right away with the correct scale

This way we can avoid creating a pixbuf just to obtain a surface with
the right device scale, the cairo surface we're rendering to will
be already suitable for the scale factor the application/env has.
Comment 3 Marinus Schraal 2016-11-15 00:17:45 UTC
Review of attachment 339794 [details] [review]:

refactor to build on top, lgtm

fix the art_size please while at it.

::: gnomemusic/albumartcache.py
@@ +49,2 @@
 @log
+def _make_icon_frame(pixbuf, widget, art_size=None):

Looking at this I realize the art_size=None makes no sense at all. I think its a left-over artifact of the refactor, my bad.
Comment 4 Marinus Schraal 2016-11-15 00:23:27 UTC
Review of attachment 339795 [details] [review]:

This doesn't work for me.

If I scale up the window (im not on HiDPI) I can clearly see that the albumart is blurrier than without this patch. Can you confirm?
Comment 5 Marinus Schraal 2017-02-24 09:58:04 UTC
Ok, I rechecked this and it does indeed not show hires icons in the artist view, because get_window() returns None for the ArtistAlbumWidget.
Comment 6 GNOME Infrastructure Team 2018-01-10 14:57:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-music/issues/81.