The function does not need fence argument. It could be handled within AndroidHardwareBuffer. Though all tested recent Android devices did not return valid fence.
AndroidHardwareBuffer usage is not enabled on gecko.
Differential Revision: https://phabricator.services.mozilla.com/D93217
We needs to reduce file descriptor creation for AndroidHardwareBuffer to avoid out of file descriptor situation. SharedSurface_AndroidHardwareBuffer::ToSurfaceDescriptor() is called for every composition. It causes avoid out of file descriptor.
By the change, file descriptor is created only once for each AndroidHardwareBuffer of SharedSurface_AndroidHardwareBuffer.
Differential Revision: https://phabricator.services.mozilla.com/D90066
AHardwareBuffer requests to handle android fences. There are 2 type of fences, release fence and acquire fence. Some ideas were borrowed from b2g's FenceHandle implementation.
The release fence is a fence that is used for waiting until usage/composite of AHardwareBuffer is ended. It needs to be delivered from host side to client side. It is delivered via ImageBridge, since some TextureClientd str recycled without recycle callback.
The acquire fence is a fence that is used for waiting until rendering to its AHardwareBuffer is completed. It is delivered from client side to host side.
Differential Revision: https://phabricator.services.mozilla.com/D87298
AHardwareBuffer is supported since Android O(APIVersion 26). Implementation of AndroidHardwareBufferTextureData referred AndroidNativeWindowTextureData. Implementation of AndroidHardwareBufferTextureHost referred obsoleted GrallocTextureHost.
android fence is not supported yet.
Differential Revision: https://phabricator.services.mozilla.com/D81808