am 00afb817
: Merge "libgui: Plumb detachBuffer through ConsumerBase"
* commit '00afb8177fdbf144c75c00e9eacc915589807d35': libgui: Plumb detachBuffer through ConsumerBase
This commit is contained in:
commit
5977851b80
@ -76,6 +76,9 @@ public:
|
||||
// when a new frame becomes available.
|
||||
void setFrameAvailableListener(const wp<FrameAvailableListener>& listener);
|
||||
|
||||
// See IGraphicBufferConsumer::detachBuffer
|
||||
status_t detachBuffer(int slot);
|
||||
|
||||
private:
|
||||
ConsumerBase(const ConsumerBase&);
|
||||
void operator=(const ConsumerBase&);
|
||||
|
@ -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, "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user