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

Commit d8091b93 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

libui: flush hwbinder commands in Allocator::allocate

Bug: 36279079
Test: monkey test on fugu
Change-Id: I81f72d63d3ede64f279b26208bb5df7646050e73
parent 47c1875e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -72,6 +72,7 @@ cc_library_shared {
        "libhardware",
        "libhardware",
        "libhidlbase",
        "libhidlbase",
        "libhidltransport",
        "libhidltransport",
        "libhwbinder",
        "libsync",
        "libsync",
        "libutils",
        "libutils",
        "liblog",
        "liblog",
+4 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


#define LOG_TAG "Gralloc2"
#define LOG_TAG "Gralloc2"


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


#include <log/log.h>
#include <log/log.h>
@@ -241,6 +242,9 @@ Error Allocator::allocate(BufferDescriptor descriptor, uint32_t count,
                *outStride = tmpStride;
                *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;
    return (ret.isOk()) ? error : kTransactionError;
}
}