[cairo-commit] 2 commits - src/cairo-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 26 01:07:46 UTC 2023


 src/cairo-surface.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9ed9cfcf36fa4f0ba56dce0cf6b5efe77177be1e
Merge: 2490c8bc0 ad667d4af
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Jan 26 01:07:44 2023 +0000

    Merge branch 'fix-clear-color-glyphs' into 'master'
    
    surface: Don't optimize away color glyphs
    
    See merge request cairo/cairo!419

commit ad667d4afd9dc6d6a392a2abe1fe7475748e452a
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Sat Jan 21 10:46:52 2023 -0500

    surface: Don't optimize away color glyphs
    
    The surface code was optimizing away show_text_glyphs
    based on the operator when the source pattern is clear.
    But if we are rendering color glyphs, that is not
    correct since we are using the glyphs as source.

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 6f1a9b019..503a9a1c1 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2933,8 +2933,12 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
     if (unlikely (status))
 	return status;
 
-    if (nothing_to_do (surface, op, source))
-	return CAIRO_STATUS_SUCCESS;
+    if (!(_cairo_scaled_font_has_color_glyphs (scaled_font) &&
+	  scaled_font->options.color_mode != CAIRO_COLOR_MODE_NO_COLOR))
+    {
+        if (nothing_to_do (surface, op, source))
+	    return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _cairo_surface_begin_modification (surface);
     if (unlikely (status))


More information about the cairo-commit mailing list