summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-04-07 22:58:47 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-07 22:58:47 +0000
commit172ff24ccbc232cdf244a2bcbbb51df754929521 (patch)
tree218f6e702da6739b013d9055420717ff4d2e41de /libs
parent6b4f28a7930c115f4b9e0d4fdfcd41b3bb58bf58 (diff)
parent5977851b80549f24cd9164ec075b79c6c6291fa5 (diff)
downloadframeworks_native-172ff24ccbc232cdf244a2bcbbb51df754929521.zip
frameworks_native-172ff24ccbc232cdf244a2bcbbb51df754929521.tar.gz
frameworks_native-172ff24ccbc232cdf244a2bcbbb51df754929521.tar.bz2
am 5977851b: am 00afb817: Merge "libgui: Plumb detachBuffer through ConsumerBase"
* commit '5977851b80549f24cd9164ec075b79c6c6291fa5': libgui: Plumb detachBuffer through ConsumerBase
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/ConsumerBase.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp
index b874e3a..e576018 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, "");
}