Commit 4ffd7790 by Corentin Wallez

DisplayGLX: add error checking for the dummy pbuffer creation

BUG=angleproject:892 Change-Id: I7a15f2be19a598e40d4fa5a7c70d879cdbc6d32a Reviewed-on: https://chromium-review.googlesource.com/277011Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent e1a5518e
...@@ -148,12 +148,18 @@ egl::Error DisplayGLX::initialize(egl::Display *display) ...@@ -148,12 +148,18 @@ egl::Error DisplayGLX::initialize(egl::Display *display)
// glXMakeCurrent requires a GLXDrawable so we create a temporary Pbuffer // glXMakeCurrent requires a GLXDrawable so we create a temporary Pbuffer
// (of size 0, 0) for the duration of these calls. // (of size 0, 0) for the duration of these calls.
// TODO(cwallez) error checking here
// TODO(cwallez) during the initialization of ANGLE we need a gl context current
// to query things like limits. Ideally we would want to unset the current context // to query things like limits. Ideally we would want to unset the current context
// and destroy the pbuffer before going back to the application but this is TODO // and destroy the pbuffer before going back to the application but this is TODO
mDummyPbuffer = mGLX.createPbuffer(contextConfig, nullptr); mDummyPbuffer = mGLX.createPbuffer(contextConfig, nullptr);
mGLX.makeCurrent(mDummyPbuffer, mContext); if (!mDummyPbuffer)
{
return egl::Error(EGL_NOT_INITIALIZED, "Could not create the dummy pbuffer.");
}
if (!mGLX.makeCurrent(mDummyPbuffer, mContext))
{
return egl::Error(EGL_NOT_INITIALIZED, "Could not make the dummy pbuffer current.");
}
mFunctionsGL = new FunctionsGLGLX(mGLX.getProc); mFunctionsGL = new FunctionsGLGLX(mGLX.getProc);
mFunctionsGL->initialize(); mFunctionsGL->initialize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment