Rémi Bernon (@rbernon) commented about dlls/win32u/opengl.c:
- ?rrrrrgggggbbbbb -> 00000000rrrrrrrrggggggggbbbbbbbb
- |12 |8 |4 |0 |28 |24 |20 |16 |12 |8 |4 |0 */
+static UINT convert_555_pixel_to_888(USHORT pixel) +{
- UINT red = (pixel & 0x7c00) << (16 + 3 - 10)
| (pixel & 0x7000) << (16 - 2 - 10);
- UINT green = (pixel & 0x03e0) << (8 + 3 - 5 )
| (pixel & 0x0380) << (8 - 2 - 5 );
- UINT blue = (pixel & 0x001f) << (0 + 3 - 0 )
| (pixel & 0x001c) >> ( 2 );
- return red | green | blue;
+}
+/* Blends an r8_g8_b8_a8 pixel onto an r5_b5_g5 pixel, and gives the result as
- an r5_b5_g5 pixel. */
+static USHORT blend_8888_pixel_onto_555(UINT pixel, USHORT old_pixel) {
Wouldn't it be easier to convert between RGB565 <-> RGB555 instead?