Loading libs/gui/Surface.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -267,6 +267,9 @@ int Surface::cancelBuffer(android_native_buffer_t* buffer, Mutex::Autolock lock(mMutex); Mutex::Autolock lock(mMutex); int i = getSlotFromBufferLocked(buffer); int i = getSlotFromBufferLocked(buffer); if (i < 0) { if (i < 0) { if (fenceFd >= 0) { close(fenceFd); } return i; return i; } } sp<Fence> fence(fenceFd >= 0 ? new Fence(fenceFd) : Fence::NO_FENCE); sp<Fence> fence(fenceFd >= 0 ? new Fence(fenceFd) : Fence::NO_FENCE); Loading Loading @@ -308,6 +311,9 @@ int Surface::queueBuffer(android_native_buffer_t* buffer, int fenceFd) { } } int i = getSlotFromBufferLocked(buffer); int i = getSlotFromBufferLocked(buffer); if (i < 0) { if (i < 0) { if (fenceFd >= 0) { close(fenceFd); } return i; return i; } } Loading libs/ui/GraphicBufferMapper.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -164,6 +164,9 @@ status_t GraphicBufferMapper::lockAsyncYCbCr(buffer_handle_t handle, bounds.left, bounds.top, bounds.width(), bounds.height(), bounds.left, bounds.top, bounds.width(), bounds.height(), ycbcr); ycbcr); } else { } else { if (fenceFd >= 0) { close(fenceFd); } return -EINVAL; // do not log failure return -EINVAL; // do not log failure } } Loading Loading
libs/gui/Surface.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -267,6 +267,9 @@ int Surface::cancelBuffer(android_native_buffer_t* buffer, Mutex::Autolock lock(mMutex); Mutex::Autolock lock(mMutex); int i = getSlotFromBufferLocked(buffer); int i = getSlotFromBufferLocked(buffer); if (i < 0) { if (i < 0) { if (fenceFd >= 0) { close(fenceFd); } return i; return i; } } sp<Fence> fence(fenceFd >= 0 ? new Fence(fenceFd) : Fence::NO_FENCE); sp<Fence> fence(fenceFd >= 0 ? new Fence(fenceFd) : Fence::NO_FENCE); Loading Loading @@ -308,6 +311,9 @@ int Surface::queueBuffer(android_native_buffer_t* buffer, int fenceFd) { } } int i = getSlotFromBufferLocked(buffer); int i = getSlotFromBufferLocked(buffer); if (i < 0) { if (i < 0) { if (fenceFd >= 0) { close(fenceFd); } return i; return i; } } Loading
libs/ui/GraphicBufferMapper.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -164,6 +164,9 @@ status_t GraphicBufferMapper::lockAsyncYCbCr(buffer_handle_t handle, bounds.left, bounds.top, bounds.width(), bounds.height(), bounds.left, bounds.top, bounds.width(), bounds.height(), ycbcr); ycbcr); } else { } else { if (fenceFd >= 0) { close(fenceFd); } return -EINVAL; // do not log failure return -EINVAL; // do not log failure } } Loading