[gtk/wip/chergert/glproto: 229/493] cleanup has-clip check




commit 5cd44ae2e49c50f1261d50b93fe1c69a8435bc8d
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 20 23:22:19 2021 -0800

    cleanup has-clip check

 gsk/next/gskglrenderjob.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 09144ecd04..bcd017f1bb 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -514,6 +514,12 @@ gsk_gl_render_job_pop_modelview (GskGLRenderJob *job)
     }
 }
 
+static inline gboolean
+gsk_gl_render_job_has_clip (GskGLRenderJob *job)
+{
+  return job->clip->len > 1;
+}
+
 static inline gboolean
 gsk_gl_render_job_clip_is_rectilinear (GskGLRenderJob *job)
 {
@@ -1358,7 +1364,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
    * which both have rounded corners.
    */
 
-  if (job->clip->len <= 1)
+  if (!gsk_gl_render_job_has_clip (job))
     need_offscreen = FALSE;
   else if (rounded_inner_rect_contains_rect (&current_clip, &transformed_clip.bounds))
     need_offscreen = FALSE;


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