It just occurred to me that with Webrender enabled mesa will commit our surface in `dri2_wl_swap_buffers_with_damage` which we call in `GLContextEGL::SwapBuffers()`. So even if when using `moz_container_wayland_surface_lock` there's still a chance that the surface will get commit behind our back, potentially freeing it IIUC. So maybe we have to extent our surface locking to `GLContextEGL::SwapBuffers()` as well somehow.
Bug 1655282 Comment 10 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
It just occurred to me that with Webrender enabled mesa will commit our surface in `dri2_wl_swap_buffers_with_damage` which we call in `GLContextEGL::SwapBuffers()`. So even if when using `moz_container_wayland_surface_lock` there's still a chance that the surface will get commited behind our back, potentially freeing it IIUC. So maybe we have to extent our surface locking to `GLContextEGL::SwapBuffers()` as well somehow.