Require either PBUFFER or WINDOW support in EGL, never both.

This commit is contained in:
Will S 2021-09-28 10:59:56 +01:00
parent cf101e62a9
commit 98b2d080be

View File

@ -98,7 +98,7 @@ absl::Status GlContext::CreateContextInternal(EGLContext share_context,
#ifdef MEDIAPIPE_OMIT_EGL_WINDOW_BIT
EGL_PBUFFER_BIT,
#else
EGL_PBUFFER_BIT | EGL_WINDOW_BIT,
EGL_WINDOW_BIT,
#endif
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
@ -170,13 +170,6 @@ absl::Status GlContext::CreateContext(EGLContext share_context) {
}
MP_RETURN_IF_ERROR(status);
EGLint pbuffer_attr[] = {EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE};
surface_ = eglCreatePbufferSurface(display_, config_, pbuffer_attr);
RET_CHECK(surface_ != EGL_NO_SURFACE)
<< "eglCreatePbufferSurface() returned error " << std::showbase
<< std::hex << eglGetError();
return absl::OkStatus();
}