Merge "Fix sideband stream issues"

This commit is contained in:
Wonsik Kim 2014-04-10 00:35:24 +00:00 committed by Android (Google) Code Review
commit 4cd47b2e0e
2 changed files with 11 additions and 3 deletions

View File

@ -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;
}

View File

@ -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)