Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GdkDmabufTextureBuilder
is a builder used to construct Texture
objects from DMA buffers.
DMA buffers are commonly called **_dma-bufs_**.
DMA buffers are a feature of the Linux kernel to enable efficient buffer and memory sharing between hardware such as codecs, GPUs, displays, cameras and the kernel drivers controlling them. For example, a decoder may want its output to be directly shared with the display server for rendering without a copy.
Any device driver which participates in DMA buffer sharing, can do so as either the exporter or importer of buffers (or both).
The memory that is shared via DMA buffers is usually stored in non-system memory (maybe in device's local memory or something else not directly accessible by the CPU), and accessing this memory from the CPU may have higher-than-usual overhead.
In particular for graphics data, it is not uncommon that data consists of multiple separate blocks of memory, for example one block for each of the red, green and blue channels. These blocks are called **_planes_**. DMA buffers can have up to four planes. Even if the memory is a single block, the data can be organized in multiple planes, by specifying offsets from the beginning of the data.
DMA buffers are exposed to user-space as file descriptors allowing to pass them between processes. If a DMA buffer has multiple planes, there is one file descriptor per plane.
The format of the data (for graphics data, essentially its colorspace) is described
by a 32-bit integer. These format identifiers are defined in the header file drm_fourcc.h
and commonly referred to as **_fourcc_** values, since they are identified by 4 ASCII
characters. Additionally, each DMA buffer has a **_modifier_**, which is a 64-bit integer
that describes driver-specific details of the memory layout, such as tiling or compression.
For historical reasons, some producers of dma-bufs don't provide an explicit modifier, but
instead return DMA_FORMAT_MOD_INVALID
to indicate that their modifier is **_implicit_**.
GTK tries to accommodate this situation by accepting DMA_FORMAT_MOD_INVALID
as modifier.
The operation of GdkDmabufTextureBuilder
is quite simple: Create a texture builder,
set all the necessary properties, and then call dmabufTextureBuilderBuild
to create the new texture.
The required properties for a dma-buf texture are
- The width and height in pixels
- The
fourcc
code andmodifier
which identify the format and memory layout of the dma-buf - The file descriptor, offset and stride for each of the planes
GdkDmabufTextureBuilder
can be used for quick one-shot construction of
textures as well as kept around and reused to construct multiple textures.
For further information, see
- The Linux kernel documentation
- The header file drm_fourcc.h
Since: 4.14
Synopsis
- newtype DmabufTextureBuilder = DmabufTextureBuilder (ManagedPtr DmabufTextureBuilder)
- class (GObject o, IsDescendantOf DmabufTextureBuilder o) => IsDmabufTextureBuilder o
- toDmabufTextureBuilder :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m DmabufTextureBuilder
- dmabufTextureBuilderBuild :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Maybe DestroyNotify -> Ptr () -> m (Maybe Texture)
- dmabufTextureBuilderGetDisplay :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Display
- dmabufTextureBuilderGetFd :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m Int32
- dmabufTextureBuilderGetFourcc :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Word32
- dmabufTextureBuilderGetHeight :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Word32
- dmabufTextureBuilderGetModifier :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Word64
- dmabufTextureBuilderGetNPlanes :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Word32
- dmabufTextureBuilderGetOffset :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m Word32
- dmabufTextureBuilderGetPremultiplied :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Bool
- dmabufTextureBuilderGetStride :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m Word32
- dmabufTextureBuilderGetUpdateRegion :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m (Maybe Region)
- dmabufTextureBuilderGetUpdateTexture :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m (Maybe Texture)
- dmabufTextureBuilderGetWidth :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> m Word32
- dmabufTextureBuilderNew :: (HasCallStack, MonadIO m) => m DmabufTextureBuilder
- dmabufTextureBuilderSetDisplay :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a, IsDisplay b) => a -> b -> m ()
- dmabufTextureBuilderSetFd :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> Int32 -> m ()
- dmabufTextureBuilderSetFourcc :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m ()
- dmabufTextureBuilderSetHeight :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m ()
- dmabufTextureBuilderSetModifier :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word64 -> m ()
- dmabufTextureBuilderSetNPlanes :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m ()
- dmabufTextureBuilderSetOffset :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> Word32 -> m ()
- dmabufTextureBuilderSetPremultiplied :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Bool -> m ()
- dmabufTextureBuilderSetStride :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> Word32 -> m ()
- dmabufTextureBuilderSetUpdateRegion :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Maybe Region -> m ()
- dmabufTextureBuilderSetUpdateTexture :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a, IsTexture b) => a -> Maybe b -> m ()
- dmabufTextureBuilderSetWidth :: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) => a -> Word32 -> m ()
- constructDmabufTextureBuilderDisplay :: (IsDmabufTextureBuilder o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getDmabufTextureBuilderDisplay :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Display
- setDmabufTextureBuilderDisplay :: (MonadIO m, IsDmabufTextureBuilder o, IsDisplay a) => o -> a -> m ()
- constructDmabufTextureBuilderFourcc :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getDmabufTextureBuilderFourcc :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32
- setDmabufTextureBuilderFourcc :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m ()
- constructDmabufTextureBuilderHeight :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getDmabufTextureBuilderHeight :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32
- setDmabufTextureBuilderHeight :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m ()
- constructDmabufTextureBuilderModifier :: (IsDmabufTextureBuilder o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getDmabufTextureBuilderModifier :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word64
- setDmabufTextureBuilderModifier :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word64 -> m ()
- constructDmabufTextureBuilderNPlanes :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getDmabufTextureBuilderNPlanes :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32
- setDmabufTextureBuilderNPlanes :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m ()
- constructDmabufTextureBuilderPremultiplied :: (IsDmabufTextureBuilder o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDmabufTextureBuilderPremultiplied :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Bool
- setDmabufTextureBuilderPremultiplied :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Bool -> m ()
- clearDmabufTextureBuilderUpdateRegion :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m ()
- constructDmabufTextureBuilderUpdateRegion :: (IsDmabufTextureBuilder o, MonadIO m) => Region -> m (GValueConstruct o)
- getDmabufTextureBuilderUpdateRegion :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m (Maybe Region)
- setDmabufTextureBuilderUpdateRegion :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Region -> m ()
- clearDmabufTextureBuilderUpdateTexture :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m ()
- constructDmabufTextureBuilderUpdateTexture :: (IsDmabufTextureBuilder o, MonadIO m, IsTexture a) => a -> m (GValueConstruct o)
- getDmabufTextureBuilderUpdateTexture :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m (Maybe Texture)
- setDmabufTextureBuilderUpdateTexture :: (MonadIO m, IsDmabufTextureBuilder o, IsTexture a) => o -> a -> m ()
- constructDmabufTextureBuilderWidth :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getDmabufTextureBuilderWidth :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32
- setDmabufTextureBuilderWidth :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m ()
Exported types
newtype DmabufTextureBuilder Source #
Memory-managed wrapper type.
Instances
Eq DmabufTextureBuilder Source # | |
Defined in GI.Gdk.Objects.DmabufTextureBuilder (==) :: DmabufTextureBuilder -> DmabufTextureBuilder -> Bool # (/=) :: DmabufTextureBuilder -> DmabufTextureBuilder -> Bool # | |
GObject DmabufTextureBuilder Source # | |
Defined in GI.Gdk.Objects.DmabufTextureBuilder | |
ManagedPtrNewtype DmabufTextureBuilder Source # | |
TypedObject DmabufTextureBuilder Source # | |
Defined in GI.Gdk.Objects.DmabufTextureBuilder | |
HasParentTypes DmabufTextureBuilder Source # | |
Defined in GI.Gdk.Objects.DmabufTextureBuilder | |
IsGValue (Maybe DmabufTextureBuilder) Source # | Convert |
Defined in GI.Gdk.Objects.DmabufTextureBuilder gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe DmabufTextureBuilder -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe DmabufTextureBuilder) # | |
type ParentTypes DmabufTextureBuilder Source # | |
Defined in GI.Gdk.Objects.DmabufTextureBuilder type ParentTypes DmabufTextureBuilder = '[Object] |
class (GObject o, IsDescendantOf DmabufTextureBuilder o) => IsDmabufTextureBuilder o Source #
Type class for types which can be safely cast to DmabufTextureBuilder
, for instance with toDmabufTextureBuilder
.
Instances
(GObject o, IsDescendantOf DmabufTextureBuilder o) => IsDmabufTextureBuilder o Source # | |
Defined in GI.Gdk.Objects.DmabufTextureBuilder |
toDmabufTextureBuilder :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m DmabufTextureBuilder Source #
Cast to DmabufTextureBuilder
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, build, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getDisplay, getFd, getFourcc, getHeight, getModifier, getNPlanes, getOffset, getPremultiplied, getProperty, getQdata, getStride, getUpdateRegion, getUpdateTexture, getWidth.
Setters
setData, setDataFull, setDisplay, setFd, setFourcc, setHeight, setModifier, setNPlanes, setOffset, setPremultiplied, setProperty, setStride, setUpdateRegion, setUpdateTexture, setWidth.
build
dmabufTextureBuilderBuild Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Maybe DestroyNotify |
|
-> Ptr () |
|
-> m (Maybe Texture) | Returns: a newly built |
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.
If the dmabuf is not supported by GTK, Nothing
will be returned and error
will be set.
The destroy
function gets called when the returned texture gets released.
It is possible to call this function multiple times to create multiple textures, possibly with changing properties in between.
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).
Not all formats defined in the drm_fourcc.h
header are supported. You can use
displayGetDmabufFormats
to get a list of supported formats.
Since: 4.14
getDisplay
dmabufTextureBuilderGetDisplay Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Display | Returns: the display |
Returns the display that this texture builder is associated with.
Since: 4.14
getFd
dmabufTextureBuilderGetFd Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m Int32 | Returns: the file descriptor |
Gets the file descriptor for a plane.
Since: 4.14
getFourcc
dmabufTextureBuilderGetFourcc Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Word32 | Returns: The format |
Gets the format previously set via dmabufTextureBuilderSetFourcc
or 0 if the format wasn't set.
The format is specified as a fourcc code.
Since: 4.14
getHeight
dmabufTextureBuilderGetHeight Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Word32 | Returns: The height |
Gets the height previously set via dmabufTextureBuilderSetHeight
or
0 if the height wasn't set.
Since: 4.14
getModifier
dmabufTextureBuilderGetModifier Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Word64 | Returns: the modifier |
Gets the modifier value.
Since: 4.14
getNPlanes
dmabufTextureBuilderGetNPlanes Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Word32 | Returns: The number of planes |
Gets the number of planes.
Since: 4.14
getOffset
dmabufTextureBuilderGetOffset Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m Word32 | Returns: the offset |
Gets the offset value for a plane.
Since: 4.14
getPremultiplied
dmabufTextureBuilderGetPremultiplied Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Bool | Returns: whether the data is premultiplied |
Whether the data is premultiplied.
Since: 4.14
getStride
dmabufTextureBuilderGetStride Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m Word32 | Returns: the stride |
Gets the stride value for a plane.
Since: 4.14
getUpdateRegion
dmabufTextureBuilderGetUpdateRegion Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m (Maybe Region) | Returns: The region |
Gets the region previously set via dmabufTextureBuilderSetUpdateRegion
or
Nothing
if none was set.
Since: 4.14
getUpdateTexture
dmabufTextureBuilderGetUpdateTexture Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m (Maybe Texture) | Returns: The texture |
Gets the texture previously set via dmabufTextureBuilderSetUpdateTexture
or
Nothing
if none was set.
Since: 4.14
getWidth
dmabufTextureBuilderGetWidth Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> m Word32 | Returns: The width |
Gets the width previously set via dmabufTextureBuilderSetWidth
or
0 if the width wasn't set.
Since: 4.14
new
dmabufTextureBuilderNew Source #
:: (HasCallStack, MonadIO m) | |
=> m DmabufTextureBuilder | Returns: the new |
Creates a new texture builder.
Since: 4.14
setDisplay
dmabufTextureBuilderSetDisplay Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a, IsDisplay b) | |
=> a |
|
-> b |
|
-> m () |
Sets the display that this texture builder is associated with.
The display is used to determine the supported dma-buf formats.
Since: 4.14
setFd
dmabufTextureBuilderSetFd Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> Int32 |
|
-> m () |
Sets the file descriptor for a plane.
Since: 4.14
setFourcc
dmabufTextureBuilderSetFourcc Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the format of the texture.
The format is specified as a fourcc code.
The format must be set before calling gLTextureBuilderBuild
.
Since: 4.14
setHeight
dmabufTextureBuilderSetHeight Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the height of the texture.
The height must be set before calling gLTextureBuilderBuild
.
Since: 4.14
setModifier
dmabufTextureBuilderSetModifier Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word64 |
|
-> m () |
Sets the modifier.
Since: 4.14
setNPlanes
dmabufTextureBuilderSetNPlanes Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the number of planes of the texture.
Since: 4.14
setOffset
dmabufTextureBuilderSetOffset Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
Sets the offset for a plane.
Since: 4.14
setPremultiplied
dmabufTextureBuilderSetPremultiplied Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the data is premultiplied.
Unless otherwise specified, all formats including alpha channels are assumed to be premultiplied.
Since: 4.14
setStride
dmabufTextureBuilderSetStride Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
Sets the stride for a plane.
The stride must be set for all planes before calling gLTextureBuilderBuild
.
Since: 4.14
setUpdateRegion
dmabufTextureBuilderSetUpdateRegion Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Maybe Region |
|
-> m () |
Sets the region to be updated by this texture. Together with DmabufTextureBuilder:updateTexture this describes an update of a previous texture.
When rendering animations of large textures, it is possible that consecutive textures are only updating contents in parts of the texture. It is then possible to describe this update via these two properties, so that GTK can avoid rerendering parts that did not change.
An example would be a screen recording where only the mouse pointer moves.
Since: 4.14
setUpdateTexture
dmabufTextureBuilderSetUpdateTexture Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a, IsTexture b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the texture to be updated by this texture. See
dmabufTextureBuilderSetUpdateRegion
for an explanation.
Since: 4.14
setWidth
dmabufTextureBuilderSetWidth Source #
:: (HasCallStack, MonadIO m, IsDmabufTextureBuilder a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the width of the texture.
The width must be set before calling gLTextureBuilderBuild
.
Since: 4.14
Properties
display
The display that this texture will be used on.
Since: 4.14
constructDmabufTextureBuilderDisplay :: (IsDmabufTextureBuilder o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “display
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderDisplay :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Display Source #
Get the value of the “display
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #display
setDmabufTextureBuilderDisplay :: (MonadIO m, IsDmabufTextureBuilder o, IsDisplay a) => o -> a -> m () Source #
Set the value of the “display
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #display:=
value ]
fourcc
The format of the texture, as a fourcc value.
Since: 4.14
constructDmabufTextureBuilderFourcc :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “fourcc
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderFourcc :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32 Source #
Get the value of the “fourcc
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #fourcc
setDmabufTextureBuilderFourcc :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m () Source #
Set the value of the “fourcc
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #fourcc:=
value ]
height
The height of the texture.
Since: 4.14
constructDmabufTextureBuilderHeight :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “height
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderHeight :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32 Source #
Get the value of the “height
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #height
setDmabufTextureBuilderHeight :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m () Source #
Set the value of the “height
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #height:=
value ]
modifier
The modifier.
Since: 4.14
constructDmabufTextureBuilderModifier :: (IsDmabufTextureBuilder o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “modifier
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderModifier :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word64 Source #
Get the value of the “modifier
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #modifier
setDmabufTextureBuilderModifier :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word64 -> m () Source #
Set the value of the “modifier
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #modifier:=
value ]
nPlanes
The number of planes of the texture.
Note that you can set properties for other planes, but they will be ignored when constructing the texture.
Since: 4.14
constructDmabufTextureBuilderNPlanes :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “n-planes
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderNPlanes :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32 Source #
Get the value of the “n-planes
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #nPlanes
setDmabufTextureBuilderNPlanes :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m () Source #
Set the value of the “n-planes
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #nPlanes:=
value ]
premultiplied
Whether the alpha channel is premultiplied into the others.
Only relevant if the format has alpha.
Since: 4.14
constructDmabufTextureBuilderPremultiplied :: (IsDmabufTextureBuilder o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “premultiplied
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderPremultiplied :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Bool Source #
Get the value of the “premultiplied
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #premultiplied
setDmabufTextureBuilderPremultiplied :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Bool -> m () Source #
Set the value of the “premultiplied
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #premultiplied:=
value ]
updateRegion
The update region for GLTextureBuilder:updateTexture.
Since: 4.14
clearDmabufTextureBuilderUpdateRegion :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m () Source #
Set the value of the “update-region
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#updateRegion
constructDmabufTextureBuilderUpdateRegion :: (IsDmabufTextureBuilder o, MonadIO m) => Region -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “update-region
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderUpdateRegion :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m (Maybe Region) Source #
Get the value of the “update-region
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #updateRegion
setDmabufTextureBuilderUpdateRegion :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Region -> m () Source #
Set the value of the “update-region
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #updateRegion:=
value ]
updateTexture
The texture DmabufTextureBuilder:updateRegion is an update for.
Since: 4.14
clearDmabufTextureBuilderUpdateTexture :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m () Source #
Set the value of the “update-texture
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#updateTexture
constructDmabufTextureBuilderUpdateTexture :: (IsDmabufTextureBuilder o, MonadIO m, IsTexture a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “update-texture
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderUpdateTexture :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m (Maybe Texture) Source #
Get the value of the “update-texture
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #updateTexture
setDmabufTextureBuilderUpdateTexture :: (MonadIO m, IsDmabufTextureBuilder o, IsTexture a) => o -> a -> m () Source #
Set the value of the “update-texture
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #updateTexture:=
value ]
width
The width of the texture.
Since: 4.14
constructDmabufTextureBuilderWidth :: (IsDmabufTextureBuilder o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “width
” property. This is rarely needed directly, but it is used by new
.
getDmabufTextureBuilderWidth :: (MonadIO m, IsDmabufTextureBuilder o) => o -> m Word32 Source #
Get the value of the “width
” property.
When overloading is enabled, this is equivalent to
get
dmabufTextureBuilder #width
setDmabufTextureBuilderWidth :: (MonadIO m, IsDmabufTextureBuilder o) => o -> Word32 -> m () Source #
Set the value of the “width
” property.
When overloading is enabled, this is equivalent to
set
dmabufTextureBuilder [ #width:=
value ]