[Webkit-unassigned] [Bug 198779] [cairo][SVG] If clipPath has multiple elements, clip-path coordinate system is wrongly scaled in high DPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 12 03:05:15 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=198779

--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 371925
  --> https://bugs.webkit.org/attachment.cgi?id=371925
WIP patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371925&action=review

> Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:88
> +        // Reset the current matrix because the mask surface doesn't have a matrix.
> +        cairo_matrix_t matrix;
> +        cairo_get_matrix(m_cr.get(), &matrix);
> +        cairo_identity_matrix(m_cr.get());
>          cairo_mask_surface(m_cr.get(), maskInformation.maskSurface(), maskRect.x(), maskRect.y());
> +        cairo_set_matrix(m_cr.get(), &matrix);

This works for svg, but not for other users of GraphicsContext::clipToImageBuffer() like shadow blur, for example. It seems that svg is the only one using absolute coordinates. Removing:

AffineTransform absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(renderer);

from RenderSVGResourceClipper::applyClippingToContext and using the identity fixes the test case too. Or keeping the absolute transform but setting the device scale factor in the image buffer cairo surface.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190612/4d72c97f/attachment-0001.html>


More information about the webkit-unassigned mailing list