Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a45e1c8f authored by Jeffrey Kardatzke's avatar Jeffrey Kardatzke
Browse files

Fixed incorrect usage of native fences

This code was checking SyncFeatures::useWaitSync() and if that was true
was then using the EGL_ANDROID_native_fence_sync feature which is
incorrect. It can only use that feature if
SyncFeatures::useNativeFenceSync is true. Since it does also use
eglWaitSyncKHR, the check for useWaitSync() was left in as well.

Bug: 38452042, 77146928
Test: Verified screen capture test works on samus now

Change-Id: I5aad16c1b974b641c30faf2b1bc93ff8bedd5186
(cherry picked from commit 487abfa65449317d43877655750d7ead639d3ad6)
parent 2afd5172
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -984,7 +984,8 @@ status_t GLConsumer::doGLFenceWaitLocked() const {
    }

    if (mCurrentFence->isValid()) {
        if (SyncFeatures::getInstance().useWaitSync()) {
        if (SyncFeatures::getInstance().useWaitSync() &&
            SyncFeatures::getInstance().useNativeFenceSync()) {
            // Create an EGLSyncKHR from the current fence.
            int fenceFd = mCurrentFence->dup();
            if (fenceFd == -1) {