On 25.09.24 16:34, Sascha Hauer wrote:
> When we have a background image we want the background to actually shine
> through, so set the alpha value of the background to transparent and not
> opaque.
> 
> Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fat...@pengutronix.de>

I wonder if this could cause a slow down for framebuffers with no alpha channel,
because it will read the framebuffer on every pixel write for alpha blending
purposes, even if ultimately unnecessary?

> ---
>  drivers/video/fbconsole.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> index cec1afec56..d3615bc07f 100644
> --- a/drivers/video/fbconsole.c
> +++ b/drivers/video/fbconsole.c
> @@ -139,7 +139,7 @@ static void drawchar(struct fbc_priv *priv, int x, int y, 
> int c)
>       color = gu_rgb_to_pixel(priv->fb, rgb->r, rgb->g, rgb->b, 0xff);
>  
>       rgb = &colors[bgcolor];
> -     bgcolor = gu_rgb_to_pixel(priv->fb, rgb->r, rgb->g, rgb->b, 0xff);
> +     bgcolor = gu_rgb_to_pixel(priv->fb, rgb->r, rgb->g, rgb->b, 0x0);
>  
>       for (i = 0; i < priv->font->height; i++) {
>               uint8_t mask = 0x80;
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to