From fde476f4e56bb9d07312743ef9a6529e398830f9 Mon Sep 17 00:00:00 2001 From: Andy Street Date: Mon, 20 Apr 2015 02:47:20 -0700 Subject: [PATCH] [react_native] JS files from D2001617: [react_native] Add support for rendering to hardware textures on Android --- Libraries/Components/View/View.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index c981e4129..0fdfa1fc8 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -136,6 +136,20 @@ var View = React.createClass({ * (or one of its superviews). */ removeClippedSubviews: PropTypes.bool, + + /** + * Whether this view should render itself (and all of its children) into a + * single hardware texture on the GPU. + * + * On Android, this is useful for animations and interactions that only + * modify opacity, rotation, translation, and/or scale: in those cases, the + * view doesn't have to be redrawn and display lists don't need to be + * re-executed. The texture can just be re-used and re-composited with + * 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. + */ + renderToHardwareTextureAndroid: PropTypes.bool, }, render: function() {