Merge "libgui: Clear frame number while freeing slot"
This commit is contained in:
commit
e357f64945
@ -306,6 +306,8 @@ status_t BufferQueueConsumer::releaseBuffer(int slot, uint64_t frameNumber,
|
|||||||
|
|
||||||
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS ||
|
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS ||
|
||||||
releaseFence == NULL) {
|
releaseFence == NULL) {
|
||||||
|
BQ_LOGE("releaseBuffer: slot %d out of range or fence %p NULL", slot,
|
||||||
|
releaseFence.get());
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +346,7 @@ status_t BufferQueueConsumer::releaseBuffer(int slot, uint64_t frameNumber,
|
|||||||
mSlots[slot].mNeedsCleanupOnRelease = false;
|
mSlots[slot].mNeedsCleanupOnRelease = false;
|
||||||
return STALE_BUFFER_SLOT;
|
return STALE_BUFFER_SLOT;
|
||||||
} else {
|
} else {
|
||||||
BQ_LOGV("releaseBuffer: attempted to release buffer slot %d "
|
BQ_LOGE("releaseBuffer: attempted to release buffer slot %d "
|
||||||
"but its state was %d", slot, mSlots[slot].mBufferState);
|
"but its state was %d", slot, mSlots[slot].mBufferState);
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
@ -214,6 +214,7 @@ void BufferQueueCore::freeBufferLocked(int slot) {
|
|||||||
}
|
}
|
||||||
mSlots[slot].mBufferState = BufferSlot::FREE;
|
mSlots[slot].mBufferState = BufferSlot::FREE;
|
||||||
mSlots[slot].mAcquireCalled = false;
|
mSlots[slot].mAcquireCalled = false;
|
||||||
|
mSlots[slot].mFrameNumber = 0;
|
||||||
|
|
||||||
// Destroy fence as BufferQueue now takes ownership
|
// Destroy fence as BufferQueue now takes ownership
|
||||||
if (mSlots[slot].mEglFence != EGL_NO_SYNC_KHR) {
|
if (mSlots[slot].mEglFence != EGL_NO_SYNC_KHR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user