Module gpu_display_android

Source

StructsΒ§

AHardwareBuffer πŸ”’
AHardwareBufferInfo
ANativeWindow_Buffer πŸ”’
AndroidDisplayContext πŸ”’
AndroidDisplayContextWrapper πŸ”’
AndroidDisplaySurface πŸ”’
AndroidSurface πŸ”’
DisplayAndroid
ImportedBuffer πŸ”’
An owned reference to an AHardwareBuffer created by android_display_import_buffer.

FunctionsΒ§

android_display_flip_to_imported πŸ”’ ⚠
Presents a buffer returned by android_display_import_buffer on the given surface. Presenting the same buffer object for the same guest resource lets the Android display stack reuse its per-buffer caches instead of re-importing the buffer on every flip.
android_display_import_buffer πŸ”’ ⚠
Creates an AHardwareBuffer from ahb_info and returns an owned reference to it, or null on failure. The buffer keeps its own copies of the file descriptors, so ahb_info does not need to outlive the call. The returned buffer must be released with android_display_release_buffer.
android_display_release_buffer πŸ”’ ⚠
Releases a buffer returned by android_display_import_buffer.
create_android_display_context πŸ”’ ⚠
Constructs an AndroidDisplayContext for this backend. This awlays returns a valid (ex: non-null) handle to the context. The name parameter is from crosvm commandline and the client of crosvm will use it to locate and communicate to the AndroidDisplayContext. For example, this can be a path to UNIX domain socket where a RPC binder server listens on. error_callback is a function pointer to an error reporting function, and will be used by this and other functions below when something goes wrong. The returned context should be destroyed by calling destroy_android_display_context if this backend is no longer in use.
create_android_surface πŸ”’ ⚠
Creates an Android Surface (which is also called as Window) of given size. If the surface can’t be created for whatever reason, null pointer is returned, in which case we shouldn’t proceed further.
destroy_android_display_context πŸ”’ ⚠
Destroys the AndroidDisplayContext created from create_android_display_context.
destroy_android_surface πŸ”’ ⚠
Destroys the Android surface created from create_android_surface.
error_callback πŸ”’ ⚠
get_android_surface_buffer πŸ”’ ⚠
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.
post_android_surface_buffer πŸ”’ ⚠
Posts the buffer obtained from get_android_surface_buffer to the Android display system so that it can be displayed on the screen. Once this is called, the caller shouldn’t use the buffer any more.
set_android_surface_position πŸ”’ ⚠

Type AliasesΒ§

AHardwareBufferImportMap πŸ”’
ErrorCallback πŸ”’