SurfaceTexture: Fix a fence fd leak.
Bug: 6949010 Change-Id: I289992c964504b4fe5458dbd19b248a841ef043f
This commit is contained in:
parent
b685c54283
commit
3d1d09c0c1
@ -327,9 +327,9 @@ status_t SurfaceTexture::updateTexImage(BufferRejecter* rejecter) {
|
||||
}
|
||||
|
||||
void SurfaceTexture::setReleaseFence(int fenceFd) {
|
||||
sp<Fence> fence(new Fence(fenceFd));
|
||||
if (fenceFd == -1 || mCurrentTexture == BufferQueue::INVALID_BUFFER_SLOT)
|
||||
return;
|
||||
sp<Fence> fence(new Fence(fenceFd));
|
||||
if (!mEGLSlots[mCurrentTexture].mReleaseFence.get()) {
|
||||
mEGLSlots[mCurrentTexture].mReleaseFence = fence;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user