[Webkit-unassigned] [Bug 113849] [Cairo][SVG] marker-mid isn't shown on a joint of rectilinearly connected line-to path segments

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 31 05:38:37 PDT 2019


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

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

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

Hey Fujii, I also started to look at this when you added me to the CC. I think this could be a lot cleaner if all the logig is moved to CairoPath instead. I see another big problem of this patch, cairo_arc calls are not saved at all in element paths, so they are missing in apply(). It's not easy to add, either, because cairo generates several line_to() command from them. Maybe this is ok if apply() is never called for paths containing arcs, but we need to ensure that's the case. I see other problems, I'll comment in the patch.

> Source/WebCore/platform/graphics/cairo/PathCairo.cpp:56
> +    *this = other;

I don't think this is correct. CairoPath contains a RefPtr<cairo_context_t>, so we will end up with two Paths having the same cairo context.

> Source/WebCore/platform/graphics/cairo/PathCairo.cpp:140
>      cairo_t* cr = ensurePlatformPath()->context();
> +    m_path->translate(p);
>      cairo_translate(cr, -p.width(), -p.height());

As I said, here, and everywhere else, I think it would be cleaner if CairoPath also calls cairo_translate, since the context is there. This calls would become like a wrapper around the CairoPath one.

> Source/WebCore/platform/graphics/cairo/PlatformPathCairo.h:155
> +};

I think a single class would be simpler, we just need a switch in transform and translate to decide whether to use 1, 2, or 3 points.

-- 
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/20190731/06eabbfa/attachment.html>


More information about the webkit-unassigned mailing list