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

Commit 06da1581 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 5c580eae d8091b93
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,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;
}