Mir
mir_native_buffer.h
Go to the documentation of this file.
1/*
2 * Copyright © 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
17#ifndef MIR_CLIENT_MIR_NATIVE_BUFFER_H_
18#define MIR_CLIENT_MIR_NATIVE_BUFFER_H_
19
21
22typedef enum
23{
26} MirBufferFlag;
27
28typedef struct MirBufferPackage
29{
32
34
35 int width; /* These must come after data[] to keep ABI compatibility */
36 int height;
37
39
40 int unused0; /* Retain ABI compatibility (avoid rebuilding Mesa) */
41
42 unsigned int flags; /* MirBufferFlag's */
43 int stride;
44 int age; /**< Number of frames submitted by the client since the client has rendered to this buffer. */
45 /**< This has the same semantics as the EGL_EXT_buffer_age extension */
46 /**< \see http://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_buffer_age.txt */
47} MirBufferPackage;
48
49#ifdef ANDROID
50struct ANativeWindowBuffer;
51typedef struct ANativeWindowBuffer MirNativeBuffer;
52#else
54#endif
55#endif /* MIR_CLIENT_MIR_NATIVE_BUFFER_H_ */
@ mir_buffer_flag_can_scanout
Definition: mir_native_buffer.h:24
@ mir_buffer_flag_fenced
Definition: mir_native_buffer.h:25
@ mir_buffer_package_max
Definition: mir_native_buffer.h:20
struct MirBufferPackage MirNativeBuffer
Definition: mir_native_buffer.h:53
Definition: mir_native_buffer.h:29
int height
Definition: mir_native_buffer.h:36
int data[mir_buffer_package_max]
Definition: mir_native_buffer.h:33
int fd_items
Definition: mir_native_buffer.h:31
unsigned int flags
Definition: mir_native_buffer.h:42
int age
Number of frames submitted by the client since the client has rendered to this buffer.
Definition: mir_native_buffer.h:44
int stride
Definition: mir_native_buffer.h:43
int width
Definition: mir_native_buffer.h:35
int data_items
Definition: mir_native_buffer.h:30
int unused0
Definition: mir_native_buffer.h:40
int fd[mir_buffer_package_max]
Definition: mir_native_buffer.h:38

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.