[gtk/fix-cairo-node-deserialization] Try to fix cairo node serialization
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-cairo-node-deserialization] Try to fix cairo node serialization
- Date: Sun, 31 Jan 2021 00:48:11 +0000 (UTC)
commit 8609cd5686828f180c26ae3934f8edcaf25e4ac6
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 30 19:45:37 2021 -0500
Try to fix cairo node serialization
Place the saved png at the right offset.
This depends on
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/118
to make the cairo recording surface produce a proper png.
gsk/gskrendernodeparser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index c53597732d..58ed236f13 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -1394,7 +1394,7 @@ parse_cairo_node (GtkCssParser *parser)
if (surface != NULL)
{
cairo_t *cr = gsk_cairo_node_get_draw_context (node);
- cairo_set_source_surface (cr, surface, 0, 0);
+ cairo_set_source_surface (cr, surface, bounds.origin.x, bounds.origin.y);
cairo_paint (cr);
cairo_destroy (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]