diff options
| author | 2015-05-12 17:18:11 +0000 | |
|---|---|---|
| committer | 2015-05-12 17:18:12 +0000 | |
| commit | 38d7f7550f5848b33b2e0a2048687fc22f708fda (patch) | |
| tree | a18e916de08b9640321a93a2ca8f1c8843f87a5c /libs/gui/ConsumerBase.cpp | |
| parent | 364ed9545382539ab9875555947bc18ec94bb82b (diff) | |
| parent | a3b66932727503943b1c59e1846af60e0d95afa6 (diff) | |
Merge "libgui: Hook up onFrameReplaced"
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 e576018bf2..aa9443acfa 100644 --- a/libs/gui/ConsumerBase.cpp +++ b/libs/gui/ConsumerBase.cpp @@ -114,6 +114,21 @@ void ConsumerBase::onFrameAvailable(const BufferItem& item) {      }  } +void ConsumerBase::onFrameReplaced(const BufferItem &item) { +    CB_LOGV("onFrameReplaced"); + +    sp<FrameAvailableListener> listener; +    { +        Mutex::Autolock lock(mMutex); +        listener = mFrameAvailableListener.promote(); +    } + +    if (listener != NULL) { +        CB_LOGV("actually calling onFrameReplaced"); +        listener->onFrameReplaced(item); +    } +} +  void ConsumerBase::onBuffersReleased() {      Mutex::Autolock lock(mMutex); |