Merge "Add ConsumerBase::isAbandoned"

This commit is contained in:
Dan Stoza 2015-05-28 20:39:59 +00:00 committed by Gerrit Code Review
commit d19ad6fb67
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.
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
// log messages.
void setName(const String8& name);

View File

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