Commit 70d457d8 by Shannon Woods

Adds a required EGL_BAD_MATCH case to eglMakeCurrent

BUG=angle:723 Change-Id: I12bb763acc70cb0737adf460226242023357b368 Reviewed-on: https://chromium-review.googlesource.com/212701Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 3e3813f7
......@@ -794,6 +794,13 @@ EGLBoolean __stdcall eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface
egl::Display *display = static_cast<egl::Display*>(dpy);
gl::Context *context = static_cast<gl::Context*>(ctx);
bool noContext = (ctx == EGL_NO_CONTEXT);
bool noSurface = (draw == EGL_NO_SURFACE || read == EGL_NO_SURFACE);
if (noContext != noSurface)
{
return egl::error(EGL_BAD_MATCH, EGL_FALSE);
}
if (ctx != EGL_NO_CONTEXT && !validateContext(display, context))
{
return EGL_FALSE;
......
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