[gtk/wip/chergert/glproto: 438/526] inline isnan check




commit 578620153f6ff9aa4b0bbf21138835909bfa740e
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]