First patch is a cleanup from !10118 that I'm also going to want for !17604. Next two should be NFC. Last change does actually change behavior, but you'd need to be switching among multiple contexts on different EGLDisplays within the same thread, which is I think somewhat uncommon.