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) ...@@ -114,14 +114,18 @@ egl::Error DisplayAndroid::initialize(egl::Display *display)
<< "eglChooseConfig failed with " << egl::Error(mEGL->getError()); << "eglChooseConfig failed with " << egl::Error(mEGL->getError());
} }
int dummyPbufferAttribs[] = { // A dummy pbuffer is only needed if surfaceless contexts are not supported.
EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE, if (!mEGL->hasExtension("EGL_KHR_surfaceless_context"))
};
mDummyPbuffer = mEGL->createPbufferSurface(configWithFormat, dummyPbufferAttribs);
if (mDummyPbuffer == EGL_NO_SURFACE)
{ {
return egl::EglNotInitialized() int dummyPbufferAttribs[] = {
<< "eglCreatePbufferSurface failed with " << egl::Error(mEGL->getError()); 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 // 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