Commit c70e1208 by Corentin Wallez

egl::MakeCurrent: report platform's makeCurrent errors

This caused the context to be current from ANGLE's point of view while it wasn't from the driver's point of view. BUG=angleproject:892 Change-Id: I0719b4702721916e9eb3a9f4cafc7a86dbc7a625 Reviewed-on: https://chromium-review.googlesource.com/284871Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 44897140
...@@ -597,6 +597,13 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r ...@@ -597,6 +597,13 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r
} }
} }
Error makeCurrentError = display->makeCurrent(drawSurface, readSurface, context);
if (makeCurrentError.isError())
{
SetGlobalError(makeCurrentError);
return EGL_FALSE;
}
gl::Context *previousContext = GetGlobalContext(); gl::Context *previousContext = GetGlobalContext();
SetGlobalDisplay(display); SetGlobalDisplay(display);
...@@ -604,8 +611,6 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r ...@@ -604,8 +611,6 @@ EGLBoolean EGLAPIENTRY MakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface r
SetGlobalReadSurface(readSurface); SetGlobalReadSurface(readSurface);
SetGlobalContext(context); SetGlobalContext(context);
display->makeCurrent(drawSurface, readSurface, context);
// Release the surface from the previously-current context, to allow // Release the surface from the previously-current context, to allow
// destroyed surfaces to delete themselves. // destroyed surfaces to delete themselves.
if (previousContext != nullptr && context != previousContext) if (previousContext != nullptr && context != previousContext)
......
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