On Wed Jul 5 14:39:29 2023 +0000, Alexandros Frantzis wrote:
I have experimented with using `NtGdi` and pushed the WIP change here: https://gitlab.winehq.org/afrantzis/wine/-/commit/9b396fd07e44ead5373c760ce0.... Although I am not particularly competent with GDI myself, this seems to work OK. I do have some open question about whether this approach will allow us to implement some other [needed pixel operations](https://gitlab.winehq.org/afrantzis/wine/-/blob/wayland/dlls/winewayland.drv...) in the future. I am hoping that with some `NtGdiBitBlt` raster ops with proper brushes and also `NtGdiAlphaBlend` we will be able to get by, but I am not sure yet. There is a certain elegance going with `NtGdi` for this use case, but at the same time it also seems to be a bit of an overkill :) I think I would be OK switching, with the understanding that we may need to fall back to the hand crafted version, if those future pixel operations prove tricky to implement with `NtGdi`.
I don't have a strong opinion here, it seems to me that using GDI would be better, and save a bunch of LoC but I have no idea if the future pixel ops can be achieved with it or not. I also don't like much having to keep a section handle open for the lifetime of every window buffer.