From 4ce08a7b8967eb40ef22b77b19420253fc3fe3cc Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 26 Dec 2023 17:15:26 +0100 Subject: [PATCH] rendernode: Use different hilights When hilighting Cairo nodes, use a different hilight color than when hilighting other nodes. This allows differentiating application use of Cairo (via nodes) from renderer use of Cairo (via fallback). --- gsk/gskrendernode.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c index d126c924f9..be237ddaa6 100644 --- a/gsk/gskrendernode.c +++ b/gsk/gskrendernode.c @@ -434,11 +434,18 @@ gsk_render_node_draw_fallback (GskRenderNode *node, /* pink, black * black, pink */ - static const guint32 pixels[] = { 0xFFFF00CC, 0xFF000000, - 0xFF000000, 0xFFFF00CC }; + static const guint32 fallback_pixels[] = { 0xFFFF00CC, 0xFF000000, + 0xFF000000, 0xFFFF00CC }; + static const guint32 cairo_pixels[] = { 0xFF9900FF, 0xFF000000, + 0xFF000000, 0xFF9900FF }; + const guint32 *pixels; cairo_surface_t *surface; cairo_save (cr); + if (GSK_RENDER_NODE_TYPE (node) == GSK_CAIRO_NODE) + pixels = cairo_pixels; + else + pixels = fallback_pixels; surface = cairo_image_surface_create_for_data ((guchar *) pixels, CAIRO_FORMAT_ARGB32, 2, 2,