summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWonsik Kim <wonsik@google.com>2014-04-10 00:35:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-10 00:35:24 +0000
commit4cd47b2e0eac8eb1c4a9d69e716e6dc0e2da7227 (patch)
tree04484e81c7d10570cbfb820ffe0cd199c45107c6
parentdb1d823b4c4163d1cfea1b087ba4bc9bda721d71 (diff)
parentafe3081e0e224a3d88da2e8f211e994f833cc6bb (diff)
downloadframeworks_native-4cd47b2e0eac8eb1c4a9d69e716e6dc0e2da7227.zip
frameworks_native-4cd47b2e0eac8eb1c4a9d69e716e6dc0e2da7227.tar.gz
frameworks_native-4cd47b2e0eac8eb1c4a9d69e716e6dc0e2da7227.tar.bz2
Merge "Fix sideband stream issues"
-rw-r--r--libs/gui/BufferQueueProducer.cpp12
-rw-r--r--services/surfaceflinger/Layer.cpp2
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)