Mir
mir_buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #ifndef MIR_TOOLKIT_MIR_BUFFER_H_
19 #define MIR_TOOLKIT_MIR_BUFFER_H_
20 
23 
24 #ifdef __cplusplus
25 
29 extern "C" {
30 #endif
31 
55 
70 
79 
92  MirBuffer* buffer,
93  MirNativeFence* native_fence,
94  MirBufferAccess access);
95 
107  MirBuffer* buffer,
108  MirBufferAccess access,
109  int timeout);
110 
116 unsigned int mir_buffer_get_width(MirBuffer* buffer);
117 
123 unsigned int mir_buffer_get_height(MirBuffer* buffer);
124 
131 
138 
144 void mir_buffer_release(MirBuffer* buffer);
145 
146 #ifdef __cplusplus
147 }
149 #endif
150 
151 #endif // MIR_TOOLKIT_MIR_BUFFER_H_
unsigned int mir_buffer_get_width(MirBuffer *buffer)
Retrieve the width of the buffer in pixels.
Definition: mir_buffer_api.cpp:125
MirPixelFormat mir_buffer_get_pixel_format(MirBuffer *buffer)
Retrieve the pixel format of the buffer.
Definition: mir_buffer_api.cpp:151
unsigned int mir_buffer_get_height(MirBuffer *buffer)
Retrieve the height of the buffer in pixels.
Definition: mir_buffer_api.cpp:138
MirBufferUsage mir_buffer_get_buffer_usage(MirBuffer *buffer)
Retrieve the buffer usage of the buffer.
Definition: mir_buffer_api.cpp:164
struct MirBuffer MirBuffer
Definition: client_types_nbs.h:33
void * MirNativeFence
Definition: client_types_nbs.h:34
void mir_buffer_release(MirBuffer *buffer)
release a MirBuffer
Definition: mir_buffer_api.cpp:48
int mir_buffer_wait_for_access(MirBuffer *buffer, MirBufferAccess access, int timeout)
Wait for the fence associated with the buffer to signal.
Definition: mir_buffer_api.cpp:81
MirNativeFence * mir_buffer_get_fence(MirBuffer *)
Retrieve the native fence associated with this buffer.
Definition: mir_buffer_api.cpp:56
void mir_buffer_associate_fence(MirBuffer *buffer, MirNativeFence *native_fence, MirBufferAccess access)
Protect the buffer&#39;s contents by associating a native fence with it.
Definition: mir_buffer_api.cpp:69
Definition: mir_native_buffer.h:30
MirNativeBuffer * mir_buffer_get_native_buffer(MirBuffer *, MirBufferAccess access)
Access the native buffer associated with MirBuffer for a given purpose.
Definition: mir_buffer_api.cpp:94
MirBufferAccess
Definition: client_types_nbs.h:38
MirGraphicsRegion mir_buffer_get_graphics_region(MirBuffer *buffer, MirBufferAccess access)
Access a CPU-mapped region associated with a given buffer for the given purpose.
Definition: mir_buffer_api.cpp:109
MirBufferUsage
MirBufferUsage specifies how a surface can and will be used.
Definition: client_types.h:156
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:134
Retrieved information about a MirSurface.
Definition: client_types.h:232

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