[gtk/ngl-less-shaders: 9/10] ngl: Don't bother with uniform border nodes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ngl-less-shaders: 9/10] ngl: Don't bother with uniform border nodes
- Date: Sun, 14 Mar 2021 20:49:43 +0000 (UTC)
commit ed3f0012b191a0dad7f56b122bc4dc550e57ac2b
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 13 18:40:37 2021 -0500
ngl: Don't bother with uniform border nodes
Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.
gsk/ngl/gsknglrenderjob.c | 27 ---------------------------
1 file changed, 27 deletions(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index 20ec3d30ff..335ca960c8 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -1684,31 +1684,6 @@ gsk_ngl_render_job_visit_rect_border_node (GskNglRenderJob *job,
gsk_ngl_render_job_end_draw (job);
}
-static inline void
-gsk_ngl_render_job_visit_uniform_border_node (GskNglRenderJob *job,
- const GskRenderNode *node)
-{
- const GskRoundedRect *rounded_outline = gsk_border_node_get_outline (node);
- const GdkRGBA *colors = gsk_border_node_get_colors (node);
- const float *widths = gsk_border_node_get_widths (node);
- GskRoundedRect outline;
-
- gsk_ngl_render_job_transform_rounded_rect (job, rounded_outline, &outline);
-
- gsk_ngl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, inset_shadow));
- gsk_ngl_program_set_uniform_rounded_rect (job->current_program,
- UNIFORM_INSET_SHADOW_OUTLINE_RECT, 0,
- &outline);
- gsk_ngl_program_set_uniform1f (job->current_program,
- UNIFORM_INSET_SHADOW_SPREAD, 0,
- widths[0]);
- gsk_ngl_program_set_uniform2f (job->current_program,
- UNIFORM_INSET_SHADOW_OFFSET, 0,
- 0, 0);
- gsk_ngl_render_job_draw_rect_with_color (job, &node->bounds, &colors[0]);
- gsk_ngl_render_job_end_draw (job);
-}
-
static inline void
gsk_ngl_render_job_visit_border_node (GskNglRenderJob *job,
const GskRenderNode *node)
@@ -3329,8 +3304,6 @@ gsk_ngl_render_job_visit_node (GskNglRenderJob *job,
if (gsk_border_node_get_uniform_color (node) &&
gsk_rounded_rect_is_rectilinear (gsk_border_node_get_outline (node)))
gsk_ngl_render_job_visit_rect_border_node (job, node);
- else if (gsk_border_node_get_uniform (node))
- gsk_ngl_render_job_visit_uniform_border_node (job, node);
else
gsk_ngl_render_job_visit_border_node (job, node);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]