Skip to content

Commit fae572d

Browse files
jorge-cabfacebook-github-bot
authored andcommitted
Fix mixBlendMode not updating on Image state updates (#46680)
Summary: Pull Request resolved: #46680 Since the parent of a view with mixBlendMode prop set is the one responsible for setting the compositing of the child, when updating mixBlendMode on a child we need to also invalidate the parent. Changelog: [Android] [Fixed] - mixBlendMode now properly does state updates Reviewed By: joevilches Differential Revision: D63424394 fbshipit-source-id: 0eb15520f1087e25683853632943e64a66344481
1 parent d2c48f3 commit fae572d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ public void setFilter(@NonNull T view, @Nullable ReadableArray filter) {
213213
public void setMixBlendMode(@NonNull T view, @Nullable String mixBlendMode) {
214214
if (ViewUtil.getUIManagerType(view) == UIManagerType.FABRIC) {
215215
view.setTag(R.id.mix_blend_mode, BlendModeHelper.parseMixBlendMode(mixBlendMode));
216+
// We need to trigger drawChild for the parent ViewGroup which will set the
217+
// mixBlendMode compositing on the child
218+
if (view.getParent() instanceof View) {
219+
((View) view.getParent()).invalidate();
220+
}
216221
}
217222
}
218223

0 commit comments

Comments
 (0)