diff options
| author | 2012-06-28 14:27:53 -0700 | |
|---|---|---|
| committer | 2012-06-30 21:38:51 -0700 | |
| commit | b42b1ac1587aebda5e2f334d95b620271fafba4e (patch) | |
| tree | 5852fb46f80587194d109b3baa04a91af443181b /libs/gui/CpuConsumer.cpp | |
| parent | c777b0b3b9b0ea5d8e378fccde6935765e28e329 (diff) | |
Return fence from acquireBuffer
Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
Diffstat (limited to 'libs/gui/CpuConsumer.cpp')
| -rw-r--r-- | libs/gui/CpuConsumer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index bf2539fb6c..513828c375 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -114,6 +114,15 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { mBufferSlot[buf] = b.mGraphicBuffer; } + if (b.mFence.get()) { + err = b.mFence->wait(Fence::TIMEOUT_NEVER); + if (err != OK) { + CC_LOGE("Failed to wait for fence of acquired buffer: %s (%d)", + strerror(-err), err); + return err; + } + } + err = mBufferSlot[buf]->lock( GraphicBuffer::USAGE_SW_READ_OFTEN, b.mCrop, |