mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-19 04:52:51 +08:00
Summary: Currently on iOS in UIKit and in RN all views are by default set to `allowsGroupOpacity=true`. Any view that has all of the following - `allowsGroupOpacity` set to true - opacity greater than 0.0 and less than 1.0 - have any subviews will be rendered off screen (on CPU). [See this link for more details](https://stackoverflow.com/questions/13158796/what-triggers-offscreen-rendering-blending-and-layoutsubviews-in-ios/13649143#13649143). Which means performance will be decreased and may affect the user experience. Therefore it makes sense to allow the developers to override this property. This pull request allows for changing `allowsGroupOpacity` via `needsOffscreenAlphaCompositing`. Android already supports this. This is not a new name or variable. See https://facebook.github.io/react-native/docs/view.html#needsoffscreenalphacompositing. Pull Request resolved: https://github.com/facebook/react-native/pull/19052 Differential Revision: D14071300 Pulled By: hramos fbshipit-source-id: 004278801a19463ebf9da6f8855f02ed27926025