Draft: render/gles2: add upload thread
Uploading textures can take a significant amount of time. For instance, on my recent laptop uploading textures with full screen damage takes ~1.2ms.
Add a separate worker thread where we can perform the upload to avoid blocking the main thread.
TODO:
-
This turns out tricky to integrate into the existingNow using an EGL sync object instead.wlr_client_buffer
logic, maybe better to wait for its replacement. -
Somehow it seems like the texture isn't written to properly anymore? The old contents show up. -
Handle texture destruction.