Mir
fenced_buffers.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
5  * it under the terms of the GNU Lesser General Public License version 2 or 3 as
6  * 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  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_EXTENSIONS_FENCED_BUFFERS_H_
20 #define MIR_CLIENT_EXTENSIONS_FENCED_BUFFERS_H_
21 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 typedef enum MirBufferAccess
29 {
34 
55 
69  MirBuffer* buffer,
70  int fence,
71  MirBufferAccess access);
72 
84  MirBuffer* buffer,
85  MirBufferAccess access,
86  int timeout);
87 
89 {
94 
95 static inline MirExtensionFencedBuffersV1 const* mir_extension_fenced_buffers_v1(
96  MirConnection* connection)
97 {
99  connection, "mir_extension_fenced_buffers", 1);
100 }
101 #ifdef __cplusplus
102 }
103 #endif
104 #endif /* MIR_CLIENT_EXTENSIONS_ANDORID_EGL_H_ */
void(* mir_buffer_associate_fence)(MirBuffer *buffer, int fence, MirBufferAccess access)
Protect the buffer's contents by associating a native fence with it.
Definition: fenced_buffers.h:68
int(* mir_buffer_get_fence)(MirBuffer *)
Retrieve the native fence associated with this buffer.
Definition: fenced_buffers.h:54
MirBufferAccess
Definition: fenced_buffers.h:29
@ mir_none
Definition: fenced_buffers.h:30
@ mir_read
Definition: fenced_buffers.h:31
@ mir_read_write
Definition: fenced_buffers.h:32
int(* mir_buffer_wait_for_access)(MirBuffer *buffer, MirBufferAccess access, int timeout)
Wait for the fence associated with the buffer to signal.
Definition: fenced_buffers.h:83
struct MirExtensionFencedBuffersV1 MirExtensionFencedBuffersV1
struct MirBuffer MirBuffer
Definition: client_types.h:56
struct MirConnection MirConnection
Definition: client_types.h:41
void const * mir_connection_request_extension(MirConnection *connection, char const *interface, int version)
Request a Mir extension.
Definition: fenced_buffers.h:89
mir_buffer_get_fence get_fence
Definition: fenced_buffers.h:90
mir_buffer_associate_fence associate_fence
Definition: fenced_buffers.h:91
mir_buffer_wait_for_access wait_for_access
Definition: fenced_buffers.h:92

Copyright © 2012-2021 Canonical Ltd.
Generated on Sun Jan 31 10:47:24 UTC 2021
This documentation is licensed under the GPL version 2 or 3.