am d2d5a64a
: workaround a deadlock when taking screenshots into a surface
* commit 'd2d5a64aa21cfc548c8c8333d1b36979e5e5a640': workaround a deadlock when taking screenshots into a surface
This commit is contained in:
commit
5e80aa10d3
@ -995,7 +995,7 @@ void BufferQueue::freeAllBuffersExceptHeadLocked() {
|
||||
}
|
||||
|
||||
status_t BufferQueue::drainQueueLocked() {
|
||||
while (mSynchronousMode && !mQueue.isEmpty()) {
|
||||
while (mSynchronousMode && mQueue.size() > 1) {
|
||||
mDequeueCondition.wait(mMutex);
|
||||
if (mAbandoned) {
|
||||
ST_LOGE("drainQueueLocked: BufferQueue has been abandoned!");
|
||||
@ -1012,7 +1012,7 @@ status_t BufferQueue::drainQueueLocked() {
|
||||
status_t BufferQueue::drainQueueAndFreeBuffersLocked() {
|
||||
status_t err = drainQueueLocked();
|
||||
if (err == NO_ERROR) {
|
||||
if (mSynchronousMode) {
|
||||
if (mQueue.empty()) {
|
||||
freeAllBuffersLocked();
|
||||
} else {
|
||||
freeAllBuffersExceptHeadLocked();
|
||||
|
Loading…
Reference in New Issue
Block a user