[gtk/matthiasc/for-master: 1/2] Avoid hand-rolled color glyph information
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 1/2] Avoid hand-rolled color glyph information
- Date: Sun, 5 Sep 2021 14:58:57 +0000 (UTC)
commit 65ce3eb2076bc0490a4d9bc152cc31e08d9522b6
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 4 09:39:29 2021 -0400
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.
gsk/gskrendernodeimpl.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 30ef0ff38b..4b85fa60c1 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -4377,15 +4377,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,
@@ -4411,7 +4402,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->attr.is_color)
continue;
gsk_render_node_diff_impossible (node1, node2, region);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]