Decouple CSSBackgroundDrawable from OutsetBoxShadowDrawable#45805
Closed
NickGerleman wants to merge 1 commit into
Closed
Decouple CSSBackgroundDrawable from OutsetBoxShadowDrawable#45805NickGerleman wants to merge 1 commit into
NickGerleman wants to merge 1 commit into
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D60401423 |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D60401423 |
b983652 to
f883a6a
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D60401423 |
f883a6a to
77a88ef
Compare
…#45805) Summary: Pull Request resolved: facebook#45805 After recent changes where we dive into paths ourselves, we really don't have a good reason to use the heavy CSSBackgroundDrawable. Accept a box shadow style in place of a reference to the original drawable, and then draw using calculated round rect path instead of new whole Drawable. This lets us avoid a lot of conversions as well (with the last diff already removing some). Changelog: [Internal] Differential Revision: D60401423
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D60401423 |
77a88ef to
7b027fa
Compare
NickGerleman
added a commit
to NickGerleman/react-native
that referenced
this pull request
Aug 8, 2024
…#45805) Summary: Pull Request resolved: facebook#45805 After recent changes where we dive into paths ourselves, we really don't have a good reason to use the heavy CSSBackgroundDrawable. Accept a box shadow style in place of a reference to the original drawable, and then draw using calculated round rect path instead of new whole Drawable. This lets us avoid a lot of conversions as well (with the last diff already removing some). This should also resolve a crash we started seeing: ``` androidx.core.util.Preconditions.checkNotNull (Preconditions.java:136) [inlined] - com.facebook.react.uimanager.drawable.CSSBackgroundDrawable.drawRoundedBackgroundWithBorders (CSSBackgroundDrawable.java:386) [inlined] - com.facebook.react.uimanager.drawable.CSSBackgroundDrawable.draw (CSSBackgroundDrawable.java:142) - com.facebook.react.uimanager.drawable.OutsetBoxShadowDrawable.draw (OutsetBoxShadowDrawable.kt:137) - android.graphics.drawable.LayerDrawable.draw (LayerDrawable.java:1019) ``` Changelog: [Internal] Differential Revision: D60401423
Contributor
|
This pull request has been merged in d56d9d9. |
Collaborator
|
This pull request was successfully merged by @NickGerleman in d56d9d9 When will my fix make it into a release? | How to file a pick request? |
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:
After recent changes where we dive into paths ourselves, we really don't have a good reason to use the heavy CSSBackgroundDrawable. Accept a box shadow style in place of a reference to the original drawable, and then draw using calculated round rect path instead of new whole Drawable. This lets us avoid a lot of conversions as well (with the last diff already removing some).
Changelog: [Internal]
Differential Revision: D60401423