From the docs [1], if contexts or surfaces associated with display is current to any thread, they are not released until they are no longer current as a result of eglMakeCurrent. So call eglMakeCurrent() to such effect. [1] https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglMakeCurrent.xhtml
Created attachment 452341 [details] patch
Related to https://bugs.webkit.org/show_bug.cgi?id=217655#c22
Committed r290299 (247622@main): <https://commits.webkit.org/247622@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 452341 [details].
<rdar://problem/89283758>