summaryrefslogtreecommitdiff
path: root/gdk/gdkmemorytextureprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2021-10-07 06:19:41 +0200
committerBenjamin Otte <otte@redhat.com>2021-10-12 02:06:43 +0200
commitb65b64628d0b5c883ba563eda412d88758c67b89 (patch)
tree5271fe8cce6e714fd38e4dd6d9a265d710b950ad /gdk/gdkmemorytextureprivate.h
parentd89e82d4a082febfe44d3504786fcab91eab62a3 (diff)
downloadgtk+-b65b64628d0b5c883ba563eda412d88758c67b89.tar.gz
texture: Refactor downloading
Pass a format do GdkTextureClass::download(). That way we can download data in any format. Also replace gdk_texture_download_texture() with gdk_memory_texture_from_texture() which again takes a format. The old functionality is still there for code that wants it: Just pass gdk_texture_get_format (texture) as the format argument.
Diffstat (limited to 'gdk/gdkmemorytextureprivate.h')
-rw-r--r--gdk/gdkmemorytextureprivate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkmemorytextureprivate.h b/gdk/gdkmemorytextureprivate.h
index 0cd5e91f27..a71648a950 100644
--- a/gdk/gdkmemorytextureprivate.h
+++ b/gdk/gdkmemorytextureprivate.h
@@ -29,6 +29,9 @@ G_BEGIN_DECLS
#define GDK_MEMORY_GDK_PIXBUF_OPAQUE GDK_MEMORY_R8G8B8
#define GDK_MEMORY_GDK_PIXBUF_ALPHA GDK_MEMORY_R8G8B8A8
+GdkMemoryTexture * gdk_memory_texture_from_texture (GdkTexture *texture,
+ GdkMemoryFormat format);
+
const guchar * gdk_memory_texture_get_data (GdkMemoryTexture *self);
gsize gdk_memory_texture_get_stride (GdkMemoryTexture *self);