gui: skin_display: draw album art first

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Tue, 26 May 2026 10:10:52 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 2a29dedeb6152d9811bfba4fe988f985985e36d9
Author: Christian Soffke <[email protected]>
Date:   Tue May 26 02:19:24 2026 +0200

    gui: skin_display: draw album art first
    
    Some themes, such as Themify, FreshOS, iPod reFresh, Jive,
    iPodOS, iPone, iClassic, AbsoluteBlack320, and possibly
    others, draw a mask over the album art on the foreground
    layer, in order to add rounded corners or to apply a fake
    camera perspective (instead of taking advantage of the
    backdrop layer).
    
    This results in rendering glitches that can be fixed by
    drawing the album art first.
    
    Change-Id: Ie373c51304ab0d0a09b8663a8adff343a32ae5bb

diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 4fbe9ac805..60591dddd3 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -410,8 +410,17 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
     (void)vp;
     struct wps_data *data = gwps->data;
     struct screen *display = gwps->display;
-    struct skin_token_list *list = SKINOFFSETTOPTR(get_skin_buffer(data), data->images);
 
+    /* Start with album art, as it may be drawn over by mask images */
+#ifdef HAVE_ALBUMART
+    struct skin_albumart *aa = SKINOFFSETTOPTR(get_skin_buffer(data), data->albumart);
+    if (aa && aa->draw_handle >= 0)
+    {
+        draw_album_art(gwps, aa->draw_handle, false);
+        aa->draw_handle = -1;
+    }
+#endif
+    struct skin_token_list *list = SKINOFFSETTOPTR(get_skin_buffer(data), data->images);
     while (list)
     {
         struct wps_token *token = SKINOFFSETTOPTR(get_skin_buffer(data), list->token);
@@ -433,15 +442,6 @@ void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
         }
         list = SKINOFFSETTOPTR(get_skin_buffer(data), list->next);
     }
-#ifdef HAVE_ALBUMART
-    /* now draw the AA */
-    struct skin_albumart *aa = SKINOFFSETTOPTR(get_skin_buffer(data), data->albumart);
-    if (aa && aa->draw_handle >= 0)
-    {
-        draw_album_art(gwps, aa->draw_handle, false);
-        aa->draw_handle = -1;
-    }
-#endif
 
     display->set_drawmode(DRMODE_SOLID);
 }
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs