From 1b62ef3e55b62c7d4b67b0ca4423c72a8afd506b Mon Sep 17 00:00:00 2001 From: Fujii Hironori Date: Wed, 1 Mar 2023 13:55:20 +0900 Subject: [PATCH] DWrite: region clipping didn't work on win32 surfaces The following clipping text tests of win32/rgb24 target were visibly failing because clipping didn't work. * clip-text * partial-clip-text-bottom * partial-clip-text-left * partial-clip-text-right * partial-clip-text-top _cairo_win32_gdi_compositor_glyphs sets the clip. However, _cairo_dwrite_show_glyphs_on_surface unset it. Fixes cairo/cairo#641 --- src/win32/cairo-dwrite-font.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp index d12f7b70b..cf516d41c 100644 --- a/src/win32/cairo-dwrite-font.cpp +++ b/src/win32/cairo-dwrite-font.cpp @@ -1738,15 +1738,6 @@ _cairo_dwrite_show_glyphs_on_surface(void *surface, if (op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_OVER) return CAIRO_INT_STATUS_UNSUPPORTED; - /* If we have a fallback mask clip set on the dst, we have - * to go through the fallback path */ - if (!_cairo_surface_is_win32_printing (&dst->base)) { - if (clip != NULL) - _cairo_win32_display_surface_set_clip (to_win32_display_surface (dst), clip); - else - _cairo_win32_display_surface_unset_clip (to_win32_display_surface (dst)); - } - /* It is vital that dx values for dxy_buf are calculated from the delta of * _logical_ x coordinates (not user x coordinates) or else the sum of all * previous dx values may start to diverge from the current glyph's x