This is based on https://gitlab.winehq.org/wine/wine/-/merge_requests/6025 but differs from it in that it switches to ARGB buffers dynamically, only when needed. This approach avoids the cost of manual handling opacity in non-shaped windows, and also the potential second-order performance effects (see https://gitlab.winehq.org/wine/wine/-/merge_requests/6025#note_75560).