fix(android): invalidate mask bitmap for descendant updates#250
Open
ddx533534 wants to merge 1 commit into
Open
fix(android): invalidate mask bitmap for descendant updates#250ddx533534 wants to merge 1 commit into
ddx533534 wants to merge 1 commit into
Conversation
Author
|
@arasrezaei @cpojer @brentvatne @matt-oakes @dulmandakh @Naturalclar , could someone take a look at this Android fix when you have a chance? This fixes a device-specific invalidation issue where some OEM builds report a deeper descendant in |
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
On some Android OEM builds,
onDescendantInvalidated(child, target)may report a deeper descendant from the mask subtree instead of the direct mask child.This works when the callback reports the direct child, but misses updates when the callback reports a nested descendant such as a TextView. In that case, dynamic text updates inside the mask can fail to refresh the cached bitmap on some devices.
Changes
invalidate the cached mask bitmap when the invalidated child belongs to the mask subtree
add a short comment documenting the OEM-specific propagation difference
Why
This keeps the existing behavior for direct child invalidation while fixing Android devices that propagate descendant invalidation differently.
Notes
I observed this with a hierarchy like:
On some devices the callback reports child = mask ViewGroup, while on others it reports child = TextView.