On Wed Jul 5 14:39:29 2023 +0000, Rémi Bernon wrote:
I only had a quick look so far, but it seems okay already. I wondered if there was a way to use more of NtGdi function to avoid doing the pixel copy by hand, but I don't know very much the API.
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`.