[RFC][Rendering] Add shouldRasterizeIOS to View components

Summary:
Exposes the `shouldRasterize` property. Fixes #1986.
Closes https://github.com/facebook/react-native/pull/2226
Github Author: James Ide <ide@jameside.com>
This commit is contained in:
James Ide
2015-08-04 22:37:38 -01:00
parent d8f43105ed
commit d4eac3ddca
3 changed files with 26 additions and 0 deletions

View File

@@ -225,8 +225,28 @@ var View = React.createClass({
* different parameters. The downside is that this can use up limited video
* memory, so this prop should be set back to false at the end of the
* interaction/animation.
* @platform android
*/
renderToHardwareTextureAndroid: PropTypes.bool,
/**
* Whether this view should be rendered as a bitmap before compositing.
*
* On iOS, this is useful for animations and interactions that do not
* modify this component's dimensions nor its children; for example, when
* translating the position of a static view, rasterization allows the
* renderer to reuse a cached bitmap of a static view and quickly composite
* it during each frame.
*
* Rasterization incurs an off-screen drawing pass and the bitmap consumes
* memory. Test and measure when using this property.
* @platform ios
*/
shouldRasterizeIOS: PropTypes.bool,
/**
* @platform android
*/
collapsable: PropTypes.bool,
},