unsafe extern "C" fn get_android_surface_buffer(
ctx: *mut AndroidDisplayContext,
surface: *mut AndroidDisplaySurface,
out_buffer: *mut ANativeWindow_Buffer
) -> bool
Expand description
Obtains one buffer from the given Android Surface. The information about the buffer (buffer
address, size, stride, etc) is reported via the ANativeWindow_Buffer
struct. It shouldn’t
be null. The size of the buffer is guaranteed to be bigger than (width * stride * 4) bytes.
This function locks the buffer for the client, which means the caller has the exclusive
access to the buffer until it is returned back to Android display stack (surfaceflinger) by
calling post_android_surface_buffer
. This function may fail (in which case false is
returned), then the caller shouldn’t try to read out_buffer
or use the buffer in any way.