SF/HWC2: Reorder makeCurrent to avoid deadlock
Now that we are deferring the release of FramebufferSurface buffers (so that we can return a non-speculative fence), we end up holding two acquired buffers during the call into HWComposer::commit (whereas we previously would have only been holding one, with the other having been released). This means that if the EGL implementation dequeues a buffer as part of eglMakeCurrent, neither of the FramebufferSurface buffers will be free, and the call to dequeueBuffer will block. This change fixes that issue by reordering eglMakeCurrent to occur after the deferred release. Bug: 25684127 Change-Id: I6ec55b3f7b7d0e0f5be6029751cb086feeb52fbe
Loading
Please register or sign in to comment