summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/lcd-16bit-common.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c
index 7f6a51790d..423ea183dc 100644
--- a/firmware/drivers/lcd-16bit-common.c
+++ b/firmware/drivers/lcd-16bit-common.c
@@ -930,14 +930,12 @@ static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image,
930 drmode &= DRMODE_SOLID; /* mask out inversevid */ 930 drmode &= DRMODE_SOLID; /* mask out inversevid */
931 } 931 }
932 if (drmode == DRMODE_BG) 932 if (drmode == DRMODE_BG)
933 {
934 dmask = ~dmask; 933 dmask = ~dmask;
935 } 934 /* If drawmode is FG use a separate special case that blends the image
936 /* Set to DRMODE_BG as we use its code path in the switch below */ 935 * onto the current framebuffer contents. Otherwise BG is forced that
936 * blends the image with the backdrop (if any, otherwise background color )*/
937 if (image != NULL) 937 if (image != NULL)
938 { 938 drmode = (drmode == DRMODE_FG) ? DRMODE_FG|DRMODE_INT_MOD : DRMODE_BG;
939 drmode = DRMODE_BG;
940 }
941 /* Use extra bit to avoid if () in the switch-cases below */ 939 /* Use extra bit to avoid if () in the switch-cases below */
942 if ((drmode & DRMODE_BG) && lcd_backdrop) 940 if ((drmode & DRMODE_BG) && lcd_backdrop)
943 drmode |= DRMODE_INT_MOD; 941 drmode |= DRMODE_INT_MOD;
@@ -1049,6 +1047,16 @@ static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image,
1049 } 1047 }
1050 while (--col); 1048 while (--col);
1051 break; 1049 break;
1050 case DRMODE_FG|DRMODE_INT_MOD:
1051 do
1052 {
1053 *dst = blend_two_colors(*dst, *image, data & ALPHA_COLOR_LOOKUP_SIZE );
1054 dst += COL_INC;
1055 image += STRIDE_MAIN(1, stride_image);
1056 UPDATE_SRC_ALPHA;
1057 }
1058 while (--col);
1059 break;
1052 case DRMODE_FG: 1060 case DRMODE_FG:
1053 fg = current_vp->fg_pattern; 1061 fg = current_vp->fg_pattern;
1054 do 1062 do