[gtk/modern-testsuite] ngl: Avoid offscreens in more cases
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/modern-testsuite] ngl: Avoid offscreens in more cases
- Date: Thu, 16 Sep 2021 12:10:50 +0000 (UTC)
commit a1d02c40c81a258f5b75887a5028541c2a750381
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Sep 16 08:05:21 2021 -0400
ngl: Avoid offscreens in more cases
We avoid an offscreen if we know the child node
can 'handle' the transform. Shadow nodes can if their
child node does - either the child node is a text node
in which case the shortcuts we take for shadow nodes
will work fine with the transform (we just render the
text node offset), or the child is not a text node,
in which case we render the shadow to an offscreen
anyway.
This change makes the label-shadows reftest pass with
the GL renderer, not by fixing the issue but by avoiding
it.
gsk/ngl/gsknglrenderjob.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index 92d659f976..4cccd89ba5 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -252,6 +252,9 @@ node_supports_transform (const GskRenderNode *node)
case GSK_TEXT_NODE:
return TRUE;
+ case GSK_SHADOW_NODE:
+ return node_supports_transform (gsk_shadow_node_get_child (node));
+
case GSK_TRANSFORM_NODE:
return node_supports_transform (gsk_transform_node_get_child (node));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]