diff options
-rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 12 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp index 9dd90ba..249b7c7 100644 --- a/libs/gui/BufferQueueProducer.cpp +++ b/libs/gui/BufferQueueProducer.cpp @@ -793,8 +793,16 @@ status_t BufferQueueProducer::disconnect(int api) { } status_t BufferQueueProducer::setSidebandStream(const sp<NativeHandle>& stream) { - Mutex::Autolock _l(mCore->mMutex); - mCore->mSidebandStream = stream; + sp<IConsumerListener> listener; + { // Autolock scope + Mutex::Autolock _l(mCore->mMutex); + mCore->mSidebandStream = stream; + listener = mCore->mConsumerListener; + } // Autolock scope + + if (listener != NULL) { + listener->onSidebandStreamChanged(); + } return NO_ERROR; } diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 58a3040..5991fd2 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -959,7 +959,7 @@ void Layer::onPostComposition() { bool Layer::isVisible() const { const Layer::State& s(mDrawingState); return !(s.flags & layer_state_t::eLayerHidden) && s.alpha - && (mActiveBuffer != NULL); + && (mActiveBuffer != NULL || mSidebandStream != NULL); } Region Layer::latchBuffer(bool& recomputeVisibleRegions) |