ngl: Do nothing for transparent text nodes

Like the previous commit - a transparent text node
will not produce any visible pixels, so bail out early.
This commit is contained in:
Matthias Clasen 2021-07-15 13:17:17 -04:00
parent fd48afb77d
commit c799452973

View File

@ -2850,7 +2850,12 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
* We tell the shader by setting the color to vec4(-1). * We tell the shader by setting the color to vec4(-1).
*/ */
if (force_color || !gsk_text_node_has_color_glyphs (node)) if (force_color || !gsk_text_node_has_color_glyphs (node))
{
if (gdk_rgba_is_clear (color))
return;
rgba_to_half (color, c); rgba_to_half (color, c);
}
lookup.font = (PangoFont *)font; lookup.font = (PangoFont *)font;
lookup.scale = (guint) (text_scale * 1024); lookup.scale = (guint) (text_scale * 1024);