[gtk/wip/chergert/glproto: 107/493] copy clip to avoid invalidation by visiting other nodes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 107/493] copy clip to avoid invalidation by visiting other nodes
- Date: Fri, 19 Feb 2021 02:25:06 +0000 (UTC)
commit 29fe282b4691f0e5a957e608beb0a89185eaf726
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 1 21:46:25 2021 -0800
copy clip to avoid invalidation by visiting other nodes
gsk/next/gskglrenderjob.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 2fc564c1d7..2cd6f06e93 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -724,7 +724,7 @@ gsk_gl_render_job_visit_clipped_child (GskGLRenderJob *job,
{
const GskRoundedRect *current_clip = gsk_gl_render_job_get_clip (job);
- memset (&intersection, 0, sizeof (GskRoundedRect));
+ memset (&intersection, 0, sizeof intersection);
graphene_rect_intersection (&transformed_clip,
¤t_clip->bounds,
&intersection.bounds);
@@ -791,9 +791,9 @@ static void
gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
GskRenderNode *node)
{
- const GskRoundedRect *current_clip;
const GskRoundedRect *clip;
GskRenderNode *child;
+ GskRoundedRect current_clip;
GskRoundedRect transformed_clip;
float scale_x = job->scale_x;
float scale_y = job->scale_y;
@@ -804,7 +804,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
return;
clip = gsk_rounded_clip_node_get_clip (node);
- current_clip = gsk_gl_render_job_get_clip (job);
+ current_clip = *gsk_gl_render_job_get_clip (job);
gsk_gl_render_job_transform_bounds (job, &clip->bounds, &transformed_clip.bounds);
@@ -818,7 +818,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
{
GskRoundedRect intersected_clip;
- if (intersect_rounded_rectilinear (¤t_clip->bounds,
+ if (intersect_rounded_rectilinear (¤t_clip.bounds,
&transformed_clip,
&intersected_clip))
{
@@ -835,7 +835,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
if (job->clip->len <= 1)
need_offscreen = FALSE;
- else if (rounded_inner_rect_contains_rect (current_clip, &transformed_clip.bounds))
+ else if (rounded_inner_rect_contains_rect (¤t_clip, &transformed_clip.bounds))
need_offscreen = FALSE;
else
need_offscreen = TRUE;
@@ -845,7 +845,7 @@ gsk_gl_render_job_visit_rounded_clip_node (GskGLRenderJob *job,
/* If the new clip entirely contains the current clip, the intersection is simply
* the current clip, so we can ignore the new one.
*/
- if (rounded_inner_rect_contains_rect (&transformed_clip, ¤t_clip->bounds))
+ if (rounded_inner_rect_contains_rect (&transformed_clip, ¤t_clip.bounds))
{
gsk_gl_render_job_visit_node (job, child);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]