Mir
mir_native_buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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 2 or 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  * Authored by:
17  * Kevin DuBois <kevin.dubois@canonical.com>
18  */
19 
20 #ifndef MIR_CLIENT_MIR_NATIVE_BUFFER_H_
21 #define MIR_CLIENT_MIR_NATIVE_BUFFER_H_
22 
23 enum { mir_buffer_package_max = 128 };
24 
25 typedef enum
26 {
30 
31 typedef struct MirBufferPackage
32 {
34  int fd_items;
35 
37 
38  int width; /* These must come after data[] to keep ABI compatibility */
39  int height;
40 
42 
43  int unused0; /* Retain ABI compatibility (avoid rebuilding Mesa) */
44 
45  unsigned int flags; /* MirBufferFlag's */
46  int stride;
47  int age;
51 
52 #ifdef ANDROID
53 struct ANativeWindowBuffer;
54 typedef struct ANativeWindowBuffer MirNativeBuffer;
55 #else
57 #endif
58 #endif /* MIR_CLIENT_MIR_NATIVE_BUFFER_H_ */
MirBufferPackage::height
int height
Definition: mir_native_buffer.h:39
MirBufferPackage::width
int width
Definition: mir_native_buffer.h:38
MirBufferPackage
struct MirBufferPackage MirBufferPackage
MirBufferPackage::data
int data[mir_buffer_package_max]
Definition: mir_native_buffer.h:36
MirBufferFlag
MirBufferFlag
Definition: mir_native_buffer.h:25
mir_buffer_flag_fenced
@ mir_buffer_flag_fenced
Definition: mir_native_buffer.h:28
MirBufferPackage::fd
int fd[mir_buffer_package_max]
Definition: mir_native_buffer.h:41
mir_buffer_package_max
@ mir_buffer_package_max
Definition: mir_native_buffer.h:23
MirBufferPackage::data_items
int data_items
Definition: mir_native_buffer.h:33
MirBufferPackage::fd_items
int fd_items
Definition: mir_native_buffer.h:34
MirBufferPackage
Definition: mir_native_buffer.h:31
MirBufferPackage::flags
unsigned int flags
Definition: mir_native_buffer.h:45
mir_buffer_flag_can_scanout
@ mir_buffer_flag_can_scanout
Definition: mir_native_buffer.h:27
MirBufferPackage::age
int age
Number of frames submitted by the client since the client has rendered to this buffer.
Definition: mir_native_buffer.h:47
MirBufferPackage::unused0
int unused0
Definition: mir_native_buffer.h:43
MirBufferPackage::stride
int stride
Definition: mir_native_buffer.h:46

Copyright © 2012-2022 Canonical Ltd.
Generated on Mon Jun 20 18:21:25 UTC 2022
This documentation is licensed under the GPL version 2 or 3.