BackgroundStyleApplicator and boxShadow in vertical scroll views#45803
Closed
NickGerleman wants to merge 9 commits into
Closed
BackgroundStyleApplicator and boxShadow in vertical scroll views#45803NickGerleman wants to merge 9 commits into
NickGerleman wants to merge 9 commits into
Conversation
Differential Revision: D60252279
Differential Revision: D60265327
Differential Revision: D60265326
Differential Revision: D60266016
Differential Revision: D60367850
Differential Revision: D60365677
Summary:
D59300215 noticed that the drawable was leaking a clipping rect for the rest of the operations, and added a `save/restore` pair, but the save happens conditionally, so we can restore more often than we save.
Scope the save/restore, to just the area setting context then drawing onto the canvas.
```
java.lang.IllegalStateException: Underflow in restore - more restores than saves
at android.graphics.Canvas.restore(Canvas.java:647)
at com.facebook.react.uimanager.drawable.OutsetBoxShadowDrawable.draw(OutsetBoxShadowDrawable.kt:110)
at android.graphics.drawable.LayerDrawable.draw(LayerDrawable.java:1019)
```
Differential Revision: D60375357
Summary: Android borders are drawn using a path generated by `addRoundRect()` inset by half the border width, using the full border width as stoke width. The edges of the ellipsis drawn for rounded borders do not line up with the math used to trace the bounding border-box path. We inset the clipOut path, as if its bounding rectangle were about half a subpixel smaller, to mininally overlap the border on these edges. We then place the outer box shadows under the border in z-ordering, so that the minimal extra insetting is only visible with transparent backgrounds. Differential Revision: D60389685
Summary: This makes the same rough changes as I made to images, to apply background styles in view manager layer, using BackgroundStyleApplicator, including new boxShadow style property. Changelog: [Internal] Differential Revision: D60409795
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D60409795 |
Contributor
|
This pull request has been merged in d842fc6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This makes the same rough changes as I made to images, to apply background styles in view manager layer, using BackgroundStyleApplicator, including new boxShadow style property.
Changelog: [Internal]
Differential Revision: D60409795