[gtk] gl renderer: Ignore nodes with nan bounds
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] gl renderer: Ignore nodes with nan bounds
- Date: Thu, 28 Feb 2019 09:41:58 +0000 (UTC)
commit 416a4cf5eaecef391e7720dd0efbe1dea8b0009e
Author: Timm Bäder <mail baedert org>
Date: Tue Feb 26 06:49:59 2019 +0100
gl renderer: Ignore nodes with nan bounds
This can happen for certain transform nodes. The transform node's
child's bounds are fine, but the transform node bounds are all nan.
Just ignore those bounds since we can't meaningfully render them anyway.
gsk/gl/gskglrenderer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 5dfd6bb677..6684f2c073 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2442,7 +2442,8 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self,
/* This can still happen, even if the render nodes are created using
* GtkSnapshot, so let's juse be safe. */
- if (node->bounds.size.width == 0.0f || node->bounds.size.height == 0.0f)
+ if (node->bounds.size.width == 0.0f || node->bounds.size.height == 0.0f ||
+ isnan (node->bounds.size.width) || isnan (node->bounds.size.height))
return;
/* Check whether the render node is entirely out of the current
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]