Class: Gdk::DmabufTextureBuilder
- Inherits:
-
Object
- Object
- Gdk::DmabufTextureBuilder
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#build(destroy, data) ⇒ Gdk::Texture
Builds a new
GdkTexturewith the values set up in the builder. -
#display ⇒ Gdk::Display
The display that this texture will be used on.
-
#display=(display) ⇒ Gdk::Display
The display that this texture will be used on.
-
#fourcc ⇒ Integer
The format of the texture, as a fourcc value.
-
#fourcc=(fourcc) ⇒ Integer
The format of the texture, as a fourcc value.
-
#get_fd(plane) ⇒ Integer
Gets the file descriptor for a plane.
-
#get_offset(plane) ⇒ Integer
Gets the offset value for a plane.
-
#get_stride(plane) ⇒ Integer
Gets the stride value for a plane.
-
#height ⇒ Integer
The height of the texture.
-
#height=(height) ⇒ Integer
The height of the texture.
-
#initialize ⇒ Gdk::DmabufTextureBuilder
constructor
Creates a new texture builder.
-
#modifier ⇒ Integer
The modifier.
-
#modifier=(modifier) ⇒ Integer
The modifier.
-
#n_planes ⇒ Integer
The number of planes of the texture.
-
#n_planes=(n_planes) ⇒ Integer
The number of planes of the texture.
-
#premultiplied ⇒ Boolean
Whether the data is premultiplied.
-
#premultiplied=(premultiplied) ⇒ Boolean
Whether the alpha channel is premultiplied into the others.
-
#premultiplied? ⇒ Boolean
Whether the alpha channel is premultiplied into the others.
-
#set_fd(plane, fd) ⇒ nil
Sets the file descriptor for a plane.
-
#set_offset(plane, offset) ⇒ nil
Sets the offset for a plane.
-
#set_stride(plane, stride) ⇒ nil
Sets the stride for a plane.
-
#update_region ⇒ cairo::Region
The update region for [propertyGdk.GLTextureBuilder:update-texture].
-
#update_region=(update_region) ⇒ cairo::Region
The update region for [propertyGdk.GLTextureBuilder:update-texture].
-
#update_texture ⇒ Gdk::Texture
The texture [propertyGdk.DmabufTextureBuilder:update-region] is an update for.
-
#update_texture=(update_texture) ⇒ Gdk::Texture
The texture [propertyGdk.DmabufTextureBuilder:update-region] is an update for.
-
#width ⇒ Integer
The width of the texture.
-
#width=(width) ⇒ Integer
The width of the texture.
Constructor Details
#initialize ⇒ Gdk::DmabufTextureBuilder
Creates a new texture builder.
Instance Method Details
#build(destroy, data) ⇒ Gdk::Texture
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, nil 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
[methodGdk.Display.get_dmabuf_formats] to get a list of supported formats.
#display ⇒ Gdk::Display
The display that this texture will be used on.
#display=(display) ⇒ Gdk::Display
The display that this texture will be used on.
#fourcc ⇒ Integer
The format of the texture, as a fourcc value.
#fourcc=(fourcc) ⇒ Integer
The format of the texture, as a fourcc value.
#get_fd(plane) ⇒ Integer
Gets the file descriptor for a plane.
#get_offset(plane) ⇒ Integer
Gets the offset value for a plane.
#get_stride(plane) ⇒ Integer
Gets the stride value for a plane.
#height ⇒ Integer
The height of the texture.
#height=(height) ⇒ Integer
The height of the texture.
#modifier ⇒ Integer
The modifier.
#modifier=(modifier) ⇒ Integer
The modifier.
#n_planes ⇒ Integer
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.
#n_planes=(n_planes) ⇒ Integer
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.
#premultiplied ⇒ Boolean
Whether the data is premultiplied.
#premultiplied=(premultiplied) ⇒ Boolean
Whether the alpha channel is premultiplied into the others.
Only relevant if the format has alpha.
#premultiplied? ⇒ Boolean
Whether the alpha channel is premultiplied into the others.
Only relevant if the format has alpha.
#set_fd(plane, fd) ⇒ nil
Sets the file descriptor for a plane.
#set_offset(plane, offset) ⇒ nil
Sets the offset for a plane.
#set_stride(plane, stride) ⇒ nil
Sets the stride for a plane.
The stride must be set for all planes before calling [methodGdk.GLTextureBuilder.build].
#update_region ⇒ cairo::Region
The update region for [propertyGdk.GLTextureBuilder:update-texture].
#update_region=(update_region) ⇒ cairo::Region
The update region for [propertyGdk.GLTextureBuilder:update-texture].
#update_texture ⇒ Gdk::Texture
The texture [propertyGdk.DmabufTextureBuilder:update-region] is an update for.
#update_texture=(update_texture) ⇒ Gdk::Texture
The texture [propertyGdk.DmabufTextureBuilder:update-region] is an update for.
#width ⇒ Integer
The width of the texture.
#width=(width) ⇒ Integer
The width of the texture.