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
This commit is contained in:
Fujii Hironori 2023-03-01 13:55:20 +09:00
parent 17114f522b
commit 1b62ef3e55

View file

@ -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