Add ConsumerBase::isAbandoned

Bug: 20105644
Change-Id: I21526b5397ea51a15500c44a99daa9d75fc4ea67
This commit is contained in:
John Reck 2015-05-14 15:55:11 -07:00
parent c921ce2681
commit e478305181
2 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,9 @@ public:
// or by OpenGL ES as a texture) then those buffer will remain allocated. // or by OpenGL ES as a texture) then those buffer will remain allocated.
void abandon(); void abandon();
// Returns true if the ConsumerBase is in the 'abandoned' state
bool isAbandoned();
// set the name of the ConsumerBase that will be used to identify it in // set the name of the ConsumerBase that will be used to identify it in
// log messages. // log messages.
void setName(const String8& name); void setName(const String8& name);

View File

@ -171,6 +171,11 @@ void ConsumerBase::abandonLocked() {
mConsumer.clear(); mConsumer.clear();
} }
bool ConsumerBase::isAbandoned() {
Mutex::Autolock _l(mMutex);
return mAbandoned;
}
void ConsumerBase::setFrameAvailableListener( void ConsumerBase::setFrameAvailableListener(
const wp<FrameAvailableListener>& listener) { const wp<FrameAvailableListener>& listener) {
CB_LOGV("setFrameAvailableListener"); CB_LOGV("setFrameAvailableListener");