[gtk/fallback-rendering: 2/3] gl: Use the fallback debug flag
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fallback-rendering: 2/3] gl: Use the fallback debug flag
- Date: Thu, 31 Oct 2019 02:32:46 +0000 (UTC)
commit d4c97ea2b4e05df4c3540baa26a32462109ed6d1
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 30 22:30:34 2019 -0400
gl: Use the fallback debug flag
This debug flag was unused; use it to enable
fallback highlighting at runtime.
gsk/gl/gskglrenderer.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index de9ccf1539..1e1086d761 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -36,7 +36,6 @@
#define ORTHO_NEAR_PLANE -10000
#define ORTHO_FAR_PLANE 10000
-#define HIGHLIGHT_FALLBACK 0
#define DEBUG_OPS 0
#define SHADOW_EXTRA_SIZE 4
@@ -502,12 +501,20 @@ render_fallback_node (GskGLRenderer *self,
cairo_fill (cr);
cairo_restore (cr);
-#if HIGHLIGHT_FALLBACK
- if (gsk_render_node_get_node_type (node) != GSK_CAIRO_NODE)
+#if G_ENABLE_DEBUG
+ if (GSK_RENDERER_DEBUG_CHECK (GSK_RENDERER (self), FALLBACK))
{
cairo_move_to (cr, 0, 0);
cairo_rectangle (cr, 0, 0, node->bounds.size.width, node->bounds.size.height);
- cairo_set_source_rgba (cr, 1, 0, 0, 1);
+ if (gsk_render_node_get_node_type (node) == GSK_CAIRO_NODE)
+ cairo_set_source_rgba (cr, 0.3, 0, 1, 0.25);
+ else
+ cairo_set_source_rgba (cr, 1, 0, 0, 0.25);
+ cairo_fill_preserve (cr);
+ if (gsk_render_node_get_node_type (node) == GSK_CAIRO_NODE)
+ cairo_set_source_rgba (cr, 0.3, 0, 1, 1);
+ else
+ cairo_set_source_rgba (cr, 1, 0, 0, 1);
cairo_stroke (cr);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]