diff options
Diffstat (limited to 'libs/ui/Gralloc2.cpp')
-rw-r--r-- | libs/ui/Gralloc2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp index f8d9401a0e..87dbaf47d3 100644 --- a/libs/ui/Gralloc2.cpp +++ b/libs/ui/Gralloc2.cpp @@ -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; } |