Commit 838f304d by Geoff Lang Committed by Commit Bot

EGL: Skip creation of the dummy pbuffer when surfaceless is supported.

BUG=angleproject:2464 Change-Id: If1834cf88aed0ffae12bb584d6936c6c09a296a0 Reviewed-on: https://chromium-review.googlesource.com/1117022 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent a72ebeba
......@@ -114,14 +114,18 @@ egl::Error DisplayAndroid::initialize(egl::Display *display)
<< "eglChooseConfig failed with " << egl::Error(mEGL->getError());
}
int dummyPbufferAttribs[] = {
EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE,
};
mDummyPbuffer = mEGL->createPbufferSurface(configWithFormat, dummyPbufferAttribs);
if (mDummyPbuffer == EGL_NO_SURFACE)
// A dummy pbuffer is only needed if surfaceless contexts are not supported.
if (!mEGL->hasExtension("EGL_KHR_surfaceless_context"))
{
return egl::EglNotInitialized()
<< "eglCreatePbufferSurface failed with " << egl::Error(mEGL->getError());
int dummyPbufferAttribs[] = {
EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE,
};
mDummyPbuffer = mEGL->createPbufferSurface(configWithFormat, dummyPbufferAttribs);
if (mDummyPbuffer == EGL_NO_SURFACE)
{
return egl::EglNotInitialized()
<< "eglCreatePbufferSurface failed with " << egl::Error(mEGL->getError());
}
}
// Create mDummyPbuffer with a normal config, but create a no_config mContext, if possible
......
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