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

Commit 74cb3b6d authored by Chia-I Wu's avatar Chia-I Wu Committed by android-build-merger
Browse files

Merge "libui: flush hwbinder commands in Allocator::allocate" into oc-dev am: 06da1581

am: 051ca32c

Change-Id: I785c527a189c1d3a0727c7d8cf5eb57129a41994
parents d497cdcb 051ca32c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ cc_library_shared {
        "libhardware",
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libsync",
        "libutils",
        "liblog",
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#define LOG_TAG "Gralloc2"

#include <hwbinder/IPCThreadState.h>
#include <ui/Gralloc2.h>

#include <log/log.h>
@@ -241,6 +242,9 @@ Error Allocator::allocate(BufferDescriptor descriptor, uint32_t count,
                *outStride = tmpStride;
            });

    // make sure the kernel driver sees BC_FREE_BUFFER and closes the fds now
    hardware::IPCThreadState::self()->flushCommands();

    return (ret.isOk()) ? error : kTransactionError;
}