Gigabeat: Add the funky foreground color support for transparent bitmaps.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13898 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-07-15 01:06:04 +00:00
parent 6c21dc5e62
commit d219491e58

View file

@ -227,7 +227,9 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
".nextpixel: \r\n" ".nextpixel: \r\n"
"ldrh %[px], [%[s]], #2 \r\n" /* Load src pixel */ "ldrh %[px], [%[s]], #2 \r\n" /* Load src pixel */
"add %[d], %[d], #2 \r\n" /* Uncoditionally increment dst */ "add %[d], %[d], #2 \r\n" /* Uncoditionally increment dst */
"cmp %[px], %[transcolor] \r\n" /* Compare to transparent color */ "cmp %[px], %[fgcolor] \r\n" /* Compare to foreground color */
"streqh %[fgpat], [%[d], #-2] \r\n" /* Store foregroud if match */
"cmpne %[px], %[transcolor] \r\n" /* Compare to transparent color */
"strneh %[px], [%[d], #-2] \r\n" /* Store dst if not transparent */ "strneh %[px], [%[d], #-2] \r\n" /* Store dst if not transparent */
"subs %[w], %[w], #1 \r\n" /* Width counter has run down? */ "subs %[w], %[w], #1 \r\n" /* Width counter has run down? */
"bgt .nextpixel \r\n" /* More in this row? */ "bgt .nextpixel \r\n" /* More in this row? */
@ -240,7 +242,9 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y,
: [width]"r"(width), : [width]"r"(width),
[sstp]"r"(stride - width), [sstp]"r"(stride - width),
[dstp]"r"(LCD_WIDTH - width), [dstp]"r"(LCD_WIDTH - width),
[transcolor]"r"(TRANSPARENT_COLOR) [transcolor]"r"(TRANSPARENT_COLOR),
[fgcolor]"r"(REPLACEWITHFG_COLOR),
[fgpat]"r"(fg_pattern)
); );
} }