summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-01-26 01:07:44 +0000
committerAdrian Johnson <ajohnson@redneon.com>2023-01-26 01:07:44 +0000
commit9ed9cfcf36fa4f0ba56dce0cf6b5efe77177be1e (patch)
tree4326e165b593cb1a1120e5b083504be4a1896ab2 /src
parent2490c8bc0eac04fb6e223447bbf2e3f74759ac46 (diff)
parentad667d4afd9dc6d6a392a2abe1fe7475748e452a (diff)
downloadcairo-9ed9cfcf36fa4f0ba56dce0cf6b5efe77177be1e.tar.gz
Merge branch 'fix-clear-color-glyphs' into 'master'
surface: Don't optimize away color glyphs See merge request cairo/cairo!419
Diffstat (limited to 'src')
-rw-r--r--src/cairo-surface.c8
1 files changed, 6 insertions, 2 deletions
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))