Skip to content
Snippets Groups Projects
Commit 4cbe9814 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf
Browse files

wingdi: request BGRA for 32 bits display

In 32 bits we don't use the mask in the DC (BI_RGB [1]) so we don't need to
rely on a matching mask on input either.

The alpha byte of each pixel will be ignored.

It is more efficient and safe from a mask manipulation.

[1] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader
parent eb5716b3
No related branches found
No related tags found
1 merge request!4100wingdi: request BGRA for 32 bits display
Pipeline #375585 passed with stage
in 14 minutes and 26 seconds
......@@ -276,11 +276,8 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
fmt->i_gmask = 0x0000ff00;
fmt->i_bmask = 0x000000ff;
break;
case 32:
fmt->i_chroma = VLC_CODEC_RGB32;
fmt->i_rmask = 0x00ff0000;
fmt->i_gmask = 0x0000ff00;
fmt->i_bmask = 0x000000ff;
case 32: // BGRX
fmt->i_chroma = VLC_CODEC_BGRA;
break;
default:
msg_Err(vd, "screen depth %i not supported", i_depth);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment