Mir
Functions
mir_buffer.h File Reference
#include <mir_toolkit/mir_native_buffer.h>
#include <mir_toolkit/client_types_nbs.h>
Include dependency graph for mir_buffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void mir_buffer_release (MirBuffer *buffer)
 release a MirBuffer More...
 
Fenced Buffer content access functions.

These functions will wait until it is safe to access the buffer for the given purpose.

If used with mir_none, the buffer will be given the buffer immediately, and without synchronization. It is then up to the user to ensure that the buffer contents are not accessed at inapproprate times.

Note
the following functions (mir_buffer_get_native_buffer, mir_buffer_get_graphics_region) can only be used when the buffer is not submitted to the server.
MirNativeBuffermir_buffer_get_native_buffer (MirBuffer *, MirBufferAccess access)
 Access the native buffer associated with MirBuffer for a given purpose. More...
 
MirGraphicsRegion mir_buffer_get_graphics_region (MirBuffer *buffer, MirBufferAccess access)
 Access a CPU-mapped region associated with a given buffer for the given purpose. More...
 
MirNativeFencemir_buffer_get_fence (MirBuffer *)
 Retrieve the native fence associated with this buffer. More...
 
void mir_buffer_associate_fence (MirBuffer *buffer, MirNativeFence *native_fence, MirBufferAccess access)
 Protect the buffer's contents by associating a native fence with it. More...
 
int mir_buffer_wait_for_access (MirBuffer *buffer, MirBufferAccess access, int timeout)
 Wait for the fence associated with the buffer to signal. More...
 
unsigned int mir_buffer_get_width (MirBuffer *buffer)
 Retrieve the width of the buffer in pixels. More...
 
unsigned int mir_buffer_get_height (MirBuffer *buffer)
 Retrieve the height of the buffer in pixels. More...
 
MirPixelFormat mir_buffer_get_pixel_format (MirBuffer *buffer)
 Retrieve the pixel format of the buffer. More...
 
MirBufferUsage mir_buffer_get_buffer_usage (MirBuffer *buffer)
 Retrieve the buffer usage of the buffer. More...
 

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016