Struct
MtkAnonymousFile
Functions
mtk_anonymous_file_close_fd
Release a file descriptor returned by mtk_anonymous_file_open_fd().
This function must be called for every file descriptor created with
mtk_anonymous_file_open_fd()
to not leak any resources.
mtk_anonymous_file_new
Create a new anonymous read-only file of the given size and the given data The intended use-case is for sending mid-sized data from the compositor to clients.
Instance methods
mtk_anonymous_file_open_fd
Returns a file descriptor for the given file, ready to be sent to a client.
The returned file descriptor must not be shared between multiple clients.
If mapmode
is MTK_ANONYMOUS_FILE_MAPMODE_PRIVATE
the file descriptor is
only guaranteed to be mmapable with MAP_PRIVATE. If mapmode
is
MTK_ANONYMOUS_FILE_MAPMODE_SHARED
the file descriptor can be mmaped with
either MAP_PRIVATE or MAP_SHARED.