[gtk/wip/chergert/glproto] inline rgba is clear check



commit b1946e312175f154765a0be96b7c945eeed05e16
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 8 13:20:52 2021 -0800

    inline rgba is clear check

 gsk/next/gskglrenderjob.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 9938f42d75..81f1c3ad23 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -70,6 +70,7 @@
 #define rounded_rect_corner2(r)   rounded_rect_bottom_right(r)
 #define rounded_rect_corner3(r)   rounded_rect_bottom_left(r)
 #define rounded_rect_corner(r, i) (rounded_rect_corner##i(r))
+#define RGBA_IS_CLEAR(rgba) ((rgba)->alpha < ((float) 0x00ff / (float) 0xffff))
 
 typedef struct _GskGLRenderClip
 {
@@ -2699,7 +2700,7 @@ gsk_gl_render_job_visit_shadow_node (GskGLRenderJob      *job,
           continue;
         }
 
-      if (gdk_rgba_is_clear (&shadow->color))
+      if (RGBA_IS_CLEAR (&shadow->color))
         continue;
 
       if (node_is_invisible (shadow_child))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]