mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Add gdk_dmabuf_texture_builder_set_dmabuf
Private utility api.
This commit is contained in:
parent
91b98bc9e2
commit
85f2e1ccd8
@ -1005,3 +1005,19 @@ gdk_dmabuf_texture_builder_get_dmabuf (GdkDmabufTextureBuilder *self)
|
||||
{
|
||||
return &self->dmabuf;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_dmabuf_texture_builder_set_dmabuf (GdkDmabufTextureBuilder *self,
|
||||
const GdkDmabuf *dmabuf)
|
||||
{
|
||||
gdk_dmabuf_texture_builder_set_fourcc (self, dmabuf->fourcc);
|
||||
gdk_dmabuf_texture_builder_set_modifier (self, dmabuf->modifier);
|
||||
gdk_dmabuf_texture_builder_set_n_planes (self, dmabuf->n_planes);
|
||||
|
||||
for (unsigned int i = 0; i < dmabuf->n_planes; i++)
|
||||
{
|
||||
gdk_dmabuf_texture_builder_set_fd (self, i, dmabuf->planes[i].fd);
|
||||
gdk_dmabuf_texture_builder_set_stride (self, i, dmabuf->planes[i].stride);
|
||||
gdk_dmabuf_texture_builder_set_offset (self, i, dmabuf->planes[i].offset);
|
||||
}
|
||||
}
|
||||
|
@ -7,5 +7,8 @@ G_BEGIN_DECLS
|
||||
|
||||
const GdkDmabuf * gdk_dmabuf_texture_builder_get_dmabuf (GdkDmabufTextureBuilder *builder);
|
||||
|
||||
void gdk_dmabuf_texture_builder_set_dmabuf (GdkDmabufTextureBuilder *builder,
|
||||
const GdkDmabuf *dmabuf);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user