Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
include
client
mir_toolkit
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
21
#include <
mir_toolkit/mir_native_buffer.h
>
22
#include <
mir_toolkit/client_types_nbs.h
>
23
24
#ifdef __cplusplus
25
29
extern
"C"
{
30
#endif
31
54
MirNativeBuffer
*
mir_buffer_get_native_buffer
(
MirBuffer
*,
MirBufferAccess
access);
55
69
MirGraphicsRegion
mir_buffer_get_graphics_region
(
MirBuffer
* buffer,
MirBufferAccess
access);
70
78
MirNativeFence
*
mir_buffer_get_fence
(
MirBuffer
*);
79
91
void
mir_buffer_associate_fence
(
92
MirBuffer
* buffer,
93
MirNativeFence
* native_fence,
94
MirBufferAccess
access);
95
106
int
mir_buffer_wait_for_access
(
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
130
MirPixelFormat
mir_buffer_get_pixel_format
(
MirBuffer
* buffer);
131
137
MirBufferUsage
mir_buffer_get_buffer_usage
(
MirBuffer
* buffer);
138
144
void
mir_buffer_release
(
MirBuffer
* buffer);
145
146
#ifdef __cplusplus
147
}
149
#endif
150
151
#endif // MIR_TOOLKIT_MIR_BUFFER_H_
mir_buffer_get_width
unsigned int mir_buffer_get_width(MirBuffer *buffer)
Retrieve the width of the buffer in pixels.
Definition:
mir_buffer_api.cpp:125
mir_buffer_get_pixel_format
MirPixelFormat mir_buffer_get_pixel_format(MirBuffer *buffer)
Retrieve the pixel format of the buffer.
Definition:
mir_buffer_api.cpp:151
mir_native_buffer.h
mir_buffer_get_height
unsigned int mir_buffer_get_height(MirBuffer *buffer)
Retrieve the height of the buffer in pixels.
Definition:
mir_buffer_api.cpp:138
mir_buffer_get_buffer_usage
MirBufferUsage mir_buffer_get_buffer_usage(MirBuffer *buffer)
Retrieve the buffer usage of the buffer.
Definition:
mir_buffer_api.cpp:164
MirBuffer
struct MirBuffer MirBuffer
Definition:
client_types_nbs.h:33
MirNativeFence
void * MirNativeFence
Definition:
client_types_nbs.h:34
mir_buffer_release
void mir_buffer_release(MirBuffer *buffer)
release a MirBuffer
Definition:
mir_buffer_api.cpp:48
mir_buffer_wait_for_access
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
mir_buffer_get_fence
MirNativeFence * mir_buffer_get_fence(MirBuffer *)
Retrieve the native fence associated with this buffer.
Definition:
mir_buffer_api.cpp:56
mir_buffer_associate_fence
void mir_buffer_associate_fence(MirBuffer *buffer, MirNativeFence *native_fence, MirBufferAccess access)
Protect the buffer's contents by associating a native fence with it.
Definition:
mir_buffer_api.cpp:69
MirBufferPackage
Definition:
mir_native_buffer.h:30
mir_buffer_get_native_buffer
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
client_types_nbs.h
MirBufferAccess
MirBufferAccess
Definition:
client_types_nbs.h:38
mir_buffer_get_graphics_region
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
MirBufferUsage specifies how a surface can and will be used.
Definition:
client_types.h:156
MirPixelFormat
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition:
common.h:134
MirGraphicsRegion
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