Make eglMakeCurrent validate for config compatibility
See section 2.2 of the EGL 1.5 specification.
BUG=angleproject:892
Change-Id: I2a43260e53cb045b2e06b0e50915e228cec96f33
Reviewed-on: https://chromium-review.googlesource.com/272370
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 71e9eea..b64e823 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -38,6 +38,7 @@
Context::Context(const egl::Config *config, int clientVersion, const Context *shareContext, rx::Renderer *renderer, bool notifyResets, bool robustAccess)
: mRenderer(renderer),
+ mConfig(config),
mData(clientVersion, mState, mCaps, mTextureCaps, mExtensions, nullptr)
{
ASSERT(robustAccess == false); // Unimplemented
@@ -47,7 +48,6 @@
mClientVersion = clientVersion;
- mConfigID = config->configID;
mClientType = EGL_OPENGL_ES_API;
mFenceNVHandleAllocator.setBaseHandle(0);
@@ -1320,9 +1320,9 @@
return mClientVersion;
}
-EGLint Context::getConfigID() const
+const egl::Config *Context::getConfig() const
{
- return mConfigID;
+ return mConfig;
}
EGLenum Context::getClientType() const