You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix nougat blank rendering with antialiased border radius clipping (facebook#56336)
Summary:
Pull Request resolved: facebook#56336
Moves `clipRect` inside the outer `saveLayer` in `clipWithAntiAliasing()` to fix blank rendering on API 24 (Nougat) devices.
facebook#55762 added `canvas.withClip()` to fix black pixels on partially off-screen views. However, it wrapped the entire compositing chain in an extra `save()`/`clipRect`/`restore()`, creating a triple-nested save/restore stack (`save` -> `saveLayer` -> `saveLayer(DST_IN)`) that breaks Porter-Duff compositing on API 24's HWUI renderer.
Moving `clipRect` inside the `saveLayer` reduces nesting from 3 to 2 levels while preserving the black-pixel mitigation. The `saveLayer` already saves and restores clip state, so a separate `save()`/`restore()` wrapper is unnecessary.
Changelog: [Android][Fixed] - Fix image content disappearing on API 24 (Nougat) when antialiased border radius clipping is applied
Reviewed By: NickGerleman
Differential Revision: D99677658
fbshipit-source-id: 55a9c84655cc08b05b95c29725492b9b8f759331
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BackgroundStyleApplicator.kt
0 commit comments