react-native
react-native copied to clipboard
Inset box shadow impl
Summary: tsia, comments should explain how this works but tldr is
- Set up cropping region to only draw within the view's bounds
- Draw 2 offscreen rects to cast the shadow. One represents the bounds of the original view, the other represents the clear region. Fill these rects with EO fill algo so the intersection is clear. The disjoint will be colored and cast a shadow.
- Do that for each shadow in reverse order
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D58885576
This pull request was exported from Phabricator. Differential Revision: D58885576
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 20,300,550 | -15 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 23,497,360 | -13 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: ad3df84668f1624e830396364c331783c6f99948 Branch: main
This pull request has been merged in facebook/react-native@d99960744c7f28b7933690103538ee5c02f8f0dd.