On Wed May 29 13:49:45 2024 +0000, Emil Velikov wrote:
The commit changes the behaviour in the Android driver. Namely the perform callbacks (and all the copying below) are called with a lock held. Haven't checked if it matters here, but it did for Mesa/egl/android. Then again the latter is an EGL implementation, not a user. Might be worth adding a note in the commit message IMHO. That aside - massive thanks for all the amazing work in the drivers. Do you plan on further reducing/nuking window_surface_funcs?
Hmm, thanks for noticing this. I don't know the android driver at all but accessing the surface bits without holding the lock was incorrect. Then I don't know if this could cause any issue, I' 'm assuming that it will not need to re-enter any surface or win32u drawing functions while drawing to the native surface.
If I understand correctly, the `perform` triggers some ioctl on a dedicated thread? If we need the flush to be done asynchronously, we could also do that the same way as winemac is doing, notifying the drawing thread asynchronously, then, taking the surface lock and reading the data from that thread.
Do you plan on further reducing/nuking window_surface_funcs?
Yes, I intend to factor most of it in win32u.