[gtk/ngl-misc-fixes: 2/2] ngl: Treat radial gradients like others
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ngl-misc-fixes: 2/2] ngl: Treat radial gradients like others
- Date: Sun, 7 Mar 2021 15:37:03 +0000 (UTC)
commit d0dce4cfa1b39ef0938d8e02205118233712c091
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 7 10:17:34 2021 -0500
ngl: Treat radial gradients like others
Handle colorstop overflow for radial gradients
the same way we do for linear and conic gradients.
gsk/ngl/gsknglrenderjob.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index 21bd4ebfa0..f2dec8d9e8 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -3355,7 +3355,10 @@ gsk_ngl_render_job_visit_node (GskNglRenderJob *job,
case GSK_RADIAL_GRADIENT_NODE:
case GSK_REPEATING_RADIAL_GRADIENT_NODE:
- gsk_ngl_render_job_visit_radial_gradient_node (job, node);
+ if (gsk_radial_gradient_node_get_n_color_stops (node) < MAX_GRADIENT_STOPS)
+ gsk_ngl_render_job_visit_radial_gradient_node (job, node);
+ else
+ gsk_ngl_render_job_visit_as_fallback (job, node);
break;
case GSK_REPEAT_NODE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]