diff options
author | 2017-05-16 14:30:34 -0700 | |
---|---|---|
committer | 2017-05-16 14:32:59 -0700 | |
commit | d8091b9331b17d4a6d5d3ec04e161b7956f67cb8 (patch) | |
tree | 78d447ebf7daf16cb103d4cc6243ecfbf543b122 /libs/ui/Gralloc2.cpp | |
parent | 47c1875e355ffb8088b842d3ddaf9a638746200f (diff) |
libui: flush hwbinder commands in Allocator::allocate
Bug: 36279079
Test: monkey test on fugu
Change-Id: I81f72d63d3ede64f279b26208bb5df7646050e73
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; } |