summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-09-04 09:39:29 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-09-04 09:39:29 -0400
commited964144834cf8668977fe50d64b1fd7096e0403 (patch)
tree01d7828ad78d24ce7db74c566dcb373b7a453147
parente6de8a1746c6825d09510bed9c49248d1ba1a145 (diff)
downloadgtk+-ed964144834cf8668977fe50d64b1fd7096e0403.tar.gz
Avoid hand-rolled color glyph information
Followup to b244f31337eea. Pango provides color glyph information for us now, so we don't need to steal a bit anymore.
-rw-r--r--gsk/gskrendernodeimpl.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 71af996efc..cb3880e005 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -4384,15 +4384,6 @@ gsk_text_node_draw (GskRenderNode *node,
cairo_restore (cr);
}
-/* We steal one of the bits in PangoGlyphVisAttr */
-
-G_STATIC_ASSERT (sizeof (PangoGlyphVisAttr) == 4);
-
-#define COLOR_GLYPH_BIT 2
-#define GLYPH_IS_COLOR(g) (((*(guint32*)&(g)->attr) & COLOR_GLYPH_BIT) != 0)
-#define GLYPH_SET_COLOR(g) (*(guint32*)(&(g)->attr) |= COLOR_GLYPH_BIT)
-#define GLYPH_CLEAR_COLOR(g) (*(guint32*)(&(g)->attr) &= ~COLOR_GLYPH_BIT)
-
static void
gsk_text_node_diff (GskRenderNode *node1,
GskRenderNode *node2,
@@ -4419,7 +4410,7 @@ gsk_text_node_diff (GskRenderNode *node1,
info1->geometry.x_offset == info2->geometry.x_offset &&
info1->geometry.y_offset == info2->geometry.y_offset &&
info1->attr.is_cluster_start == info2->attr.is_cluster_start &&
- GLYPH_IS_COLOR (info1) == GLYPH_IS_COLOR (info2))
+ info1->attr.is_color == info2->is_color)
continue;
gsk_render_node_diff_impossible (node1, node2, region);