[Suggestion] Add surface type query for eglQuerySurface()
I want to cache the surface size if I know that it doesn't change. However, there's no way for me to determine whether I can rely on that (surface being a pbuffer or pixmap surface) or not (surface being a window surface). Maybe there's other use cases for this as well, but in any case I think that a fundamental base property such as the surface type should be exposed in eglQuerySurface().
As of EGL 1.4, there's no way for me to determine this. I can distinguish between pbuffers and pixmaps using EGL_RENDER_BUFFER if I know that they're not window surfaces, but window surfaces can have either of these attributes so I can't tell just by myself. I can query the config and hope that it doesn't support window surfaces, in which case I'm good. If the config does support window surfaces, bad luck.
How about adding EGL_SURFACE_TYPE as possible attribute to eglQuerySurface() in EGL 1.5 and make it return either EGL_PBUFFER_BIT, EGL_PIXMAP_BIT or EGL_WINDOW_BIT, but only one of them?