Bug 190155 - [CG] Adopt CG SPI for non-even cornered rounded rects
Summary: [CG] Adopt CG SPI for non-even cornered rounded rects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-01 14:15 PDT by Said Abou-Hallawa
Modified: 2018-11-01 11:49 PDT (History)
10 users (show)

See Also:


Attachments
Patch (3.29 KB, patch)
2018-10-01 14:19 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (3.63 MB, application/zip)
2018-10-02 09:44 PDT, EWS Watchlist
no flags Details
Patch (3.04 KB, patch)
2018-10-15 17:29 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Testcase (397 bytes, text/html)
2018-10-17 09:10 PDT, Simon Fraser (smfr)
no flags Details
Patch (2.99 KB, patch)
2018-10-17 14:51 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.73 MB, application/zip)
2018-10-17 18:10 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (2.41 MB, application/zip)
2018-10-17 19:33 PDT, EWS Watchlist
no flags Details
Patch (5.38 KB, patch)
2018-10-18 18:25 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (5.36 KB, patch)
2018-10-29 13:55 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (6.26 MB, application/zip)
2018-10-29 15:52 PDT, EWS Watchlist
no flags Details
Patch (4.43 KB, patch)
2018-10-31 18:05 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (4.58 KB, patch)
2018-11-01 09:30 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2018-10-01 14:15:38 PDT
Currently we create bezier curves for the non-even corners of the rounded rects. This should be optimized by the CG. With this SPI, I could get 3% progression on the Multiply test on MacPro.
Comment 1 Said Abou-Hallawa 2018-10-01 14:19:17 PDT
Created attachment 351297 [details]
Patch
Comment 2 EWS Watchlist 2018-10-02 09:44:20 PDT
Comment on attachment 351297 [details]
Patch

Attachment 351297 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9426505

New failing tests:
fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-right.html
compositing/video/video-border-radius.html
fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-left.html
fast/box-shadow/box-shadow-with-zero-radius.html
fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-left.html
fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-right.html
fast/borders/border-radius-inner-clip-vertical.html
fast/borders/border-radius-inner-clip.html
css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html
Comment 3 EWS Watchlist 2018-10-02 09:44:21 PDT
Created attachment 351399 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 4 Said Abou-Hallawa 2018-10-15 17:29:06 PDT
Created attachment 352410 [details]
Patch
Comment 5 WebKit Commit Bot 2018-10-15 17:53:21 PDT
Comment on attachment 352410 [details]
Patch

Clearing flags on attachment: 352410

Committed r237163: <https://trac.webkit.org/changeset/237163>
Comment 6 WebKit Commit Bot 2018-10-15 17:53:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-10-15 17:54:26 PDT
<rdar://problem/45291653>
Comment 8 Ryan Haddad 2018-10-16 11:21:17 PDT
(In reply to Build Bot from comment #2)
> Comment on attachment 351297 [details]
> Patch
> 
> Attachment 351297 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: https://webkit-queues.webkit.org/results/9426505
> 
> New failing tests:
> fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-
> right.html
> compositing/video/video-border-radius.html
> fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-bottom-
> left.html
> fast/box-shadow/box-shadow-with-zero-radius.html
> fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-left.
> html
> fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-top-
> right.html
> fast/borders/border-radius-inner-clip-vertical.html
> fast/borders/border-radius-inner-clip.html
> css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html
These tests are indeed failing on the iOS Simulator bots now that this patch has landed:
https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Release%20WK2%20(Tests)/r237183%20(395)/results.html
Comment 9 Ryan Haddad 2018-10-16 13:18:13 PDT
Reverted r237163 for reason:

Introduced layout test failures on iOS Simulator.

Committed r237201: <https://trac.webkit.org/changeset/237201>
Comment 10 Ryan Haddad 2018-10-16 13:40:09 PDT
It looks like there were similar reftest failures seen on Mojave:
https://build.webkit.org/results/Apple%20Mojave%20Release%20WK2%20(Tests)/r237168%20(274)/results.html
Comment 11 Simon Fraser (smfr) 2018-10-17 09:06:49 PDT
With the change, we're rendering the radii with incorrect vertical flipping.
Comment 12 Simon Fraser (smfr) 2018-10-17 09:10:41 PDT
Created attachment 352569 [details]
Testcase
Comment 13 Said Abou-Hallawa 2018-10-17 14:24:47 PDT
(In reply to Simon Fraser (smfr) from comment #11)
> With the change, we're rendering the radii with incorrect vertical flipping.

The problem is I was passing the corners in the following orders:
    { topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius }

But they should be in the following order:
    { bottomLeftRadius, bottomRightRadius, topRightRadius, topLeftRadius }

This is to be consistent with CGRect whose origin is s located in the lower-left corner of the rectangle.
Comment 14 Said Abou-Hallawa 2018-10-17 14:51:46 PDT
Created attachment 352645 [details]
Patch
Comment 15 EWS Watchlist 2018-10-17 18:10:12 PDT
Comment on attachment 352645 [details]
Patch

Attachment 352645 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9644184

New failing tests:
fast/box-shadow/box-shadow-with-zero-radius.html
Comment 16 EWS Watchlist 2018-10-17 18:10:14 PDT
Created attachment 352670 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 17 EWS Watchlist 2018-10-17 19:33:32 PDT
Comment on attachment 352645 [details]
Patch

Attachment 352645 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9645666

New failing tests:
fast/box-shadow/box-shadow-with-zero-radius.html
Comment 18 EWS Watchlist 2018-10-17 19:33:34 PDT
Created attachment 352676 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 19 Said Abou-Hallawa 2018-10-18 18:25:54 PDT
Created attachment 352752 [details]
Patch
Comment 20 WebKit Commit Bot 2018-10-18 21:39:37 PDT
Comment on attachment 352752 [details]
Patch

Clearing flags on attachment: 352752

Committed r237280: <https://trac.webkit.org/changeset/237280>
Comment 21 WebKit Commit Bot 2018-10-18 21:39:39 PDT
All reviewed patches have been landed.  Closing bug.
Comment 22 Simon Fraser (smfr) 2018-10-21 05:49:07 PDT
This patch added some PLATFORM(IOS) that should be PLATFORM(IOS_FAMILY)
Comment 23 Alexey Proskuryakov 2018-10-23 09:06:54 PDT
And with that fixed, the patch still breaks box-shadow-with-zero-radius.html (fix in bug 190813).

Probably roll back again?
Comment 24 Ryan Haddad 2018-10-23 11:17:17 PDT
Reverted r237280 for reason:

Causes fast/box-shadow/box-shadow-with-zero-radius.html to fail on iOS Simulator.

Committed r237359: <https://trac.webkit.org/changeset/237359>
Comment 25 Said Abou-Hallawa 2018-10-29 13:55:18 PDT
Created attachment 353317 [details]
Patch
Comment 26 EWS Watchlist 2018-10-29 15:52:32 PDT
Comment on attachment 353317 [details]
Patch

Attachment 353317 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9772127

New failing tests:
fast/box-shadow/box-shadow-with-zero-radius.html
Comment 27 EWS Watchlist 2018-10-29 15:52:34 PDT
Created attachment 353328 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 28 Said Abou-Hallawa 2018-10-31 18:05:33 PDT
Created attachment 353565 [details]
Patch
Comment 29 Simon Fraser (smfr) 2018-10-31 23:40:18 PDT
Comment on attachment 353565 [details]
Patch

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

> LayoutTests/platform/ios/TestExpectations:1939
> +fast/box-shadow/box-shadow-with-zero-radius.html

You should mark this as [ImageOnlyFailure] so that the test still runs (to detect crashes).

Also the reason this only fails on iOS is probably because we don't use accelerated drawing for macOS testing.
Comment 30 Said Abou-Hallawa 2018-11-01 09:30:38 PDT
Created attachment 353605 [details]
Patch
Comment 31 WebKit Commit Bot 2018-11-01 11:49:20 PDT
Comment on attachment 353605 [details]
Patch

Clearing flags on attachment: 353605

Committed r237691: <https://trac.webkit.org/changeset/237691>
Comment 32 WebKit Commit Bot 2018-11-01 11:49:22 PDT
All reviewed patches have been landed.  Closing bug.