Commit 855e8b1b by Jason Macnak

Allow concurrent eglSwapBuffers() with same display but different surfaces

... by updating eglSwapBuffers() to give up the display lock before calling surface->swap(). Bug: b/135742693 Test: built locally Test: presubmit Test: cts -m CtsMediaTestCases -t android.media.cts.HeifWriterTest#testInputSurface_Grid_Handler Test: dEQP-GLES3 tests through cherry Change-Id: I816d30e80077b40e8396bf8d6ae5bb236753e3ea Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/37769Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarJason Macnak <natsu@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent ea6a98ba
...@@ -1136,11 +1136,13 @@ EGLBoolean EGLAPIENTRY SwapBuffers(EGLDisplay dpy, EGLSurface surface) ...@@ -1136,11 +1136,13 @@ EGLBoolean EGLAPIENTRY SwapBuffers(EGLDisplay dpy, EGLSurface surface)
egl::Display *display = egl::Display::get(dpy); egl::Display *display = egl::Display::get(dpy);
egl::Surface *eglSurface = (egl::Surface*)surface; egl::Surface *eglSurface = (egl::Surface*)surface;
RecursiveLockGuard lock(egl::getDisplayLock(display));
if(!validateSurface(display, eglSurface))
{ {
return EGL_FALSE; RecursiveLockGuard lock(egl::getDisplayLock(display));
if(!validateSurface(display, eglSurface))
{
return EGL_FALSE;
}
} }
if(surface == EGL_NO_SURFACE) if(surface == EGL_NO_SURFACE)
......
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