diff options
| author | 2015-04-07 23:18:48 +0000 | |
|---|---|---|
| committer | 2015-04-07 23:18:48 +0000 | |
| commit | 668285721ba81fc4fb6f5e223b382f5e604c64c2 (patch) | |
| tree | 4d9a2fdb7005c12284a15403e7cc15f3a868fc20 /libs/gui/ConsumerBase.cpp | |
| parent | 3b025f13025290f088e1206a0808034bacdf2cff (diff) | |
| parent | 172ff24ccbc232cdf244a2bcbbb51df754929521 (diff) | |
am 172ff24c: am 5977851b: am 00afb817: Merge "libgui: Plumb detachBuffer through ConsumerBase"
* commit '172ff24ccbc232cdf244a2bcbbb51df754929521':
libgui: Plumb detachBuffer through ConsumerBase
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
| -rw-r--r-- | libs/gui/ConsumerBase.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp index b874e3a320..e576018bf2 100644 --- a/libs/gui/ConsumerBase.cpp +++ b/libs/gui/ConsumerBase.cpp @@ -163,6 +163,21 @@ void ConsumerBase::setFrameAvailableListener( mFrameAvailableListener = listener; } +status_t ConsumerBase::detachBuffer(int slot) { + CB_LOGV("detachBuffer"); + Mutex::Autolock lock(mMutex); + + status_t result = mConsumer->detachBuffer(slot); + if (result != NO_ERROR) { + CB_LOGE("Failed to detach buffer: %d", result); + return result; + } + + freeBufferLocked(slot); + + return result; +} + void ConsumerBase::dump(String8& result) const { dump(result, ""); } |