Bug 226613 - [Cairo] Fix Path::boundingRectSlowCase when the path is a single MoveTo
Summary: [Cairo] Fix Path::boundingRectSlowCase when the path is a single MoveTo
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-03 17:45 PDT by Arcady Goldmints-Orlov
Modified: 2021-06-10 13:58 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.48 KB, patch)
2021-06-03 17:46 PDT, Arcady Goldmints-Orlov
no flags Details | Formatted Diff | Diff
Patch (1.75 KB, patch)
2021-06-09 11:16 PDT, Arcady Goldmints-Orlov
no flags Details | Formatted Diff | Diff
Patch (1.75 KB, patch)
2021-06-09 13:08 PDT, Arcady Goldmints-Orlov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arcady Goldmints-Orlov 2021-06-03 17:45:36 PDT
[Cairo] Fix Path::boundingRectSlowCase when the path is a single MoveTo
Comment 1 Arcady Goldmints-Orlov 2021-06-03 17:46:20 PDT
Created attachment 430520 [details]
Patch
Comment 2 Fujii Hironori 2021-06-03 18:09:38 PDT
I have questions.
Which benchmark are you using?
How does it improve?
Why is it using the single move paths?
Why is cairo_path_extents slower for the case?
Comment 3 Fujii Hironori 2021-06-03 18:35:18 PDT
Oops. I misread and misunderstood.
This is not a speed-up, but a bug fix.
Do you have a test case?
Comment 4 Carlos Garcia Campos 2021-06-04 00:43:14 PDT
Comment on attachment 430520 [details]
Patch

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

> Source/WebCore/ChangeLog:7
> +

Could you explain here what's wrong exactly. Are we rendering anything incorrectly? does this fix any test? or can we add a new one?

> Source/WebCore/platform/graphics/cairo/PathCairo.cpp:414
> +    if (m_elements && m_elements.value().size() == 1
> +        && m_elements.value()[0].type == PathElement::Type::MoveToPoint) {

This could be a single line.
Comment 5 Fujii Hironori 2021-06-06 18:55:00 PDT
Comment on attachment 430520 [details]
Patch

r- for comment#4.
Comment 6 Arcady Goldmints-Orlov 2021-06-07 08:21:32 PDT
Sorry, I should have been clearer. This fixes the new fast/svg/bounding-rect-for-path-with-only-move-command.html test which was added recently, I will add that to the changelog, and fix the formatting issue. Thanks for taking a look.
Comment 7 Arcady Goldmints-Orlov 2021-06-09 11:16:18 PDT
Created attachment 430981 [details]
Patch
Comment 8 Arcady Goldmints-Orlov 2021-06-09 13:08:10 PDT
Created attachment 431000 [details]
Patch
Comment 9 EWS 2021-06-10 13:57:04 PDT
Committed r278730 (238693@main): <https://commits.webkit.org/238693@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431000 [details].
Comment 10 Radar WebKit Bug Importer 2021-06-10 13:58:17 PDT
<rdar://problem/79158727>