GNOME Bugzilla – Bug 774402
Improve cover scaling to app/output scale factor.
Last modified: 2018-01-10 14:57:48 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.
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.
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.
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.
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?
Ok, I rechecked this and it does indeed not show hires icons in the artist view, because get_window() returns None for the ArtistAlbumWidget.
-- 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.