[gtk/wip/chergert/glproto: 291/526] cleanup has-clip check
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 291/526] cleanup has-clip check
- Date: Tue, 16 Feb 2021 01:14:32 +0000 (UTC)
commit 4e68346f0152e917e743f5274818666052d6b297
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 (¤t_clip, &transformed_clip.bounds))
need_offscreen = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]