Skip to content

fix(android): invalidate mask bitmap for descendant updates#250

Open
ddx533534 wants to merge 1 commit into
callstack:masterfrom
ddx533534:codex/fix-android-mask-descendant-invalidation
Open

fix(android): invalidate mask bitmap for descendant updates#250
ddx533534 wants to merge 1 commit into
callstack:masterfrom
ddx533534:codex/fix-android-mask-descendant-invalidation

Conversation

@ddx533534
Copy link
Copy Markdown

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:

RNCMaskedView
└── mask ViewGroup
    └── TextView

On some devices the callback reports child = mask ViewGroup, while on others it reports child = TextView.

@ddx533534 ddx533534 closed this May 20, 2026
@ddx533534 ddx533534 reopened this May 20, 2026
@ddx533534
Copy link
Copy Markdown
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 onDescendantInvalidated(...), which can prevent the cached mask bitmap from being refreshed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant