Merge "Clarify aborted updateTexImage use of fences"

This commit is contained in:
Jesse Hall 2012-06-29 09:54:25 -07:00 committed by Android (Google) Code Review
commit 02a7be74dd

View File

@ -236,10 +236,8 @@ status_t SurfaceTexture::updateTexImage(BufferRejecter* rejecter) {
// not accept this buffer. this is used by SurfaceFlinger to
// reject buffers which have the wrong size
if (rejecter && rejecter->reject(mEGLSlots[buf].mGraphicBuffer, item)) {
mBufferQueue->releaseBuffer(buf, dpy, mEGLSlots[buf].mFence,
mEGLSlots[buf].mReleaseFence);
mEGLSlots[buf].mFence = EGL_NO_SYNC_KHR;
mEGLSlots[buf].mReleaseFence.clear();
mBufferQueue->releaseBuffer(buf, dpy, EGL_NO_SYNC_KHR,
Fence::NO_FENCE);
glBindTexture(mTexTarget, mTexName);
return NO_ERROR;
}
@ -286,10 +284,8 @@ status_t SurfaceTexture::updateTexImage(BufferRejecter* rejecter) {
if (err != NO_ERROR) {
// Release the buffer we just acquired. It's not safe to
// release the old buffer, so instead we just drop the new frame.
mBufferQueue->releaseBuffer(buf, dpy, mEGLSlots[buf].mFence,
mEGLSlots[buf].mReleaseFence);
mEGLSlots[buf].mFence = EGL_NO_SYNC_KHR;
mEGLSlots[buf].mReleaseFence.clear();
mBufferQueue->releaseBuffer(buf, dpy, EGL_NO_SYNC_KHR,
Fence::NO_FENCE);
return err;
}