Method
GdkDmabufTextureBuilderbuild
since: 4.14
Declaration [src]
GdkTexture*
gdk_dmabuf_texture_builder_build (
GdkDmabufTextureBuilder* self,
GDestroyNotify destroy,
gpointer data,
GError** error
)
Description [src]
Builds a new GdkTexture
with the values set up in the builder.
It is a programming error to call this function if any mandatory property has not been set.
Not all formats defined in the drm_fourcc.h
header are supported. You can use
gdk_display_get_dmabuf_formats()
to get a list of supported formats. If the
format is not supported by GTK, NULL
will be returned and error
will be set.
The destroy
function gets called when the returned texture gets released.
It is the responsibility of the caller to keep the file descriptors for the planes
open until the created texture is no longer used, and close them afterwards (possibly
using the destroy
notify).
It is possible to call this function multiple times to create multiple textures, possibly with changing properties in between.
Available since: 4.14
Parameters
destroy
-
Type:
GDestroyNotify
Destroy function to be called when the texture is released.
The argument can be NULL
. data
-
Type:
gpointer
User data to pass to the destroy function.
The argument can be NULL
.The data is owned by the caller of the method. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the method if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GdkTexture
A newly built GdkTexture
or NULL
if the format is not supported.
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
The return value can be NULL . |