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