summaryrefslogtreecommitdiff
path: root/gdk/broadway/broadway-output.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2017-11-18 17:36:38 +0100
committerAlexander Larsson <alexl@redhat.com>2017-11-23 10:46:47 +0100
commita4636a06a72eb30681d1625048d7a45fc6ca129e (patch)
treee5780ab71dbcebcc1d7997ea60138fe341c79f83 /gdk/broadway/broadway-output.c
parentef79621c44aaf2b71542d177ca7ee5099ef5c593 (diff)
downloadgtk+-a4636a06a72eb30681d1625048d7a45fc6ca129e.tar.gz
broadway: Actually upload textures to client
Diffstat (limited to 'gdk/broadway/broadway-output.c')
-rw-r--r--gdk/broadway/broadway-output.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdk/broadway/broadway-output.c b/gdk/broadway/broadway-output.c
index 4434447e0f..b9a86daf61 100644
--- a/gdk/broadway/broadway-output.c
+++ b/gdk/broadway/broadway-output.c
@@ -330,3 +330,23 @@ broadway_output_put_buffer (BroadwayOutput *output,
g_object_unref (out);
g_object_unref (out_mem);
}
+
+void
+broadway_output_upload_texture (BroadwayOutput *output,
+ guint32 id,
+ GBytes *texture)
+{
+ gsize len = g_bytes_get_size (texture);
+ write_header (output, BROADWAY_OP_UPLOAD_TEXTURE);
+ append_uint32 (output, id);
+ append_uint32 (output, (guint32)len);
+ g_string_append_len (output->buf, g_bytes_get_data (texture, NULL), len);
+}
+
+void
+broadway_output_release_texture (BroadwayOutput *output,
+ guint32 id)
+{
+ write_header (output, BROADWAY_OP_RELEASE_TEXTURE);
+ append_uint32 (output, id);
+}