[gtk/wip/chergert/glproto] inline isnan check
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] inline isnan check
- Date: Wed, 3 Feb 2021 23:32:39 +0000 (UTC)
commit a8a6ef61065a78be41f94df7eda59ed3a48a7b74
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 3 15:41:09 2021 -0800
inline isnan check
gsk/next/gskglrenderjob.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 5af3ee3470..0959e0a6fb 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -223,13 +223,19 @@ init_full_texture_region (GskGLRenderOffscreen *offscreen)
offscreen->area.y2 = 1;
}
+static inline int
+_isnan_f (float x)
+{
+ return x != x;
+}
+
static inline gboolean G_GNUC_PURE
node_is_invisible (const GskRenderNode *node)
{
return node->bounds.size.width == 0.0f ||
node->bounds.size.height == 0.0f ||
- isnan (node->bounds.size.width) ||
- isnan (node->bounds.size.height);
+ _isnan_f (node->bounds.size.width) ||
+ _isnan_f (node->bounds.size.height);
}
static inline void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]