Require either PBUFFER or WINDOW support in EGL, never both.
This commit is contained in:
parent
cf101e62a9
commit
98b2d080be
|
@ -98,7 +98,7 @@ absl::Status GlContext::CreateContextInternal(EGLContext share_context,
|
||||||
#ifdef MEDIAPIPE_OMIT_EGL_WINDOW_BIT
|
#ifdef MEDIAPIPE_OMIT_EGL_WINDOW_BIT
|
||||||
EGL_PBUFFER_BIT,
|
EGL_PBUFFER_BIT,
|
||||||
#else
|
#else
|
||||||
EGL_PBUFFER_BIT | EGL_WINDOW_BIT,
|
EGL_WINDOW_BIT,
|
||||||
#endif
|
#endif
|
||||||
EGL_RED_SIZE, 8,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_GREEN_SIZE, 8,
|
EGL_GREEN_SIZE, 8,
|
||||||
|
@ -170,13 +170,6 @@ absl::Status GlContext::CreateContext(EGLContext share_context) {
|
||||||
}
|
}
|
||||||
MP_RETURN_IF_ERROR(status);
|
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();
|
return absl::OkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user