[gtk/ngl-color-nineslice: 1/2] ngl: Make clip updates more flexible
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ngl-color-nineslice: 1/2] ngl: Make clip updates more flexible
- Date: Tue, 9 Mar 2021 17:55:28 +0000 (UTC)
commit a93551d01dd9a565d6fc9ebef39cd8daf231d623
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 9 12:24:21 2021 -0500
ngl: Make clip updates more flexible
We only need to pass the bounds to gsk_render_job_update_clip,
not the node itself. This will let us to clip updates for other
rects, in the future.
gsk/ngl/gsknglrenderjob.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index 93ca180133..bb91c336d8 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -800,9 +800,9 @@ interval_contains (float p1, float w1,
}
static inline gboolean
-gsk_ngl_render_job_update_clip (GskNglRenderJob *job,
- const GskRenderNode *node,
- gboolean *pushed_clip)
+gsk_ngl_render_job_update_clip (GskNglRenderJob *job,
+ const graphene_rect_t *bounds,
+ gboolean *pushed_clip)
{
graphene_rect_t transformed_bounds;
gboolean no_clip = FALSE;
@@ -816,7 +816,7 @@ gsk_ngl_render_job_update_clip (GskNglRenderJob *job,
return TRUE;
}
- gsk_ngl_render_job_transform_bounds (job, &node->bounds, &transformed_bounds);
+ gsk_ngl_render_job_transform_bounds (job, bounds, &transformed_bounds);
if (!rect_intersects (&job->current_clip->rect.bounds, &transformed_bounds))
{
@@ -3439,7 +3439,7 @@ gsk_ngl_render_job_visit_node (GskNglRenderJob *job,
if (node_is_invisible (node))
return;
- if (!gsk_ngl_render_job_update_clip (job, node, &has_clip))
+ if (!gsk_ngl_render_job_update_clip (job, &node->bounds, &has_clip))
return;
switch (gsk_render_node_get_node_type (node))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]