[gtk/wip/baedert/nodeeditor: 28/42] rendernodeparser: Properly serialize texture nodes
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/nodeeditor: 28/42] rendernodeparser: Properly serialize texture nodes
- Date: Wed, 24 Apr 2019 11:39:29 +0000 (UTC)
commit 53d9e56e89ac77581c510f44da8b4d3635843675
Author: Timm Bäder <mail baedert org>
Date: Wed Apr 24 07:59:12 2019 +0200
rendernodeparser: Properly serialize texture nodes
gsk/gskrendernodeparser.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 53e2c7560c..4cf179b9ca 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -1614,6 +1614,9 @@ render_node_print (Printer *p,
start_node (p, "texture");
append_rect_param (p, "bounds", &node->bounds);
+ /* TODO: width and height here are unnecessary and can later be computed from the data length? */
+ append_float_param (p, "width", gdk_texture_get_width (texture));
+ append_float_param (p, "height", gdk_texture_get_height (texture));
stride = 4 * gdk_texture_get_width (texture);
len = sizeof (guchar) * stride * gdk_texture_get_height (texture);
@@ -1623,7 +1626,7 @@ render_node_print (Printer *p,
b64 = g_base64_encode (data, len);
_indent (p);
- g_string_append_printf (p->str, "data: \"%s\"\n", b64);
+ g_string_append_printf (p->str, "texture: \"data:;base64,%s\";\n", b64);
end_node (p);
g_free (b64);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]