Mir
Classes | Typedefs
android_buffer.h File Reference
#include "mir_toolkit/mir_connection.h"
#include "mir_toolkit/mir_buffer.h"
#include "mir_toolkit/mir_extension_core.h"
Include dependency graph for android_buffer.h:

Go to the source code of this file.

Classes

struct  MirExtensionAndroidBufferV1
 

Typedefs

typedef void(* mir_connection_allocate_buffer_android) (MirConnection *connection, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags, MirBufferCallback available_callback, void *available_context)
 Allocate a MirBuffer usable by the android platform. More...
 
typedef struct MirExtensionAndroidBufferV1 MirExtensionAndroidBufferV1
 

Typedef Documentation

typedef void(* mir_connection_allocate_buffer_android) (MirConnection *connection, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags, MirBufferCallback available_callback, void *available_context)

Allocate a MirBuffer usable by the android platform.

The callback will be called when the buffer is available for use. It will be called once when created, and once per every mir_presentation_chain_submit_buffer.

The buffer can be destroyed via mir_buffer_release().

Note
Not all GRALLOC_USAGE flags or HAL_PIXEL_FORMATs are available. Be sure to check mir_buffer_is_valid() on the returned buffer.
Parameters
[in]connectionThe connection
[in]widthRequested buffer width
[in]heightRequested buffer height
[in]hal_pixel_formatThe pixel format, one of Android's HAL_PIXEL_FORMAT*s
[in]gralloc_usage_flagsThe GRALLOC_USAGE* flags for the buffer.
[in]available_callbackThe callback called when the buffer is available
[in]available_contextThe context for the available_callback

Copyright © 2012-2016 Canonical Ltd.
Generated on Wed Oct 11 22:26:23 UTC 2017