From 68c11e55ee5f5c2d2f4f232a6e195e4f089bdb81 Mon Sep 17 00:00:00 2001 From: Ahmed El-Helw Date: Thu, 2 Jun 2016 14:02:50 -0700 Subject: [PATCH] Promote grandchildren of certain views are Views Reviewed By: astreet Differential Revision: D3161232 fbshipit-source-id: ea313d513bd7567e32f18765d479ba0538f2efbf --- .../com/facebook/react/uimanager/ViewGroupManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java index e91be0e20..7b72448ab 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java @@ -77,4 +77,13 @@ public abstract class ViewGroupManager return false; } + /** + * Returns whether or not this View type should promote its grandchildren as Views. This is an + * optimization for Scrollable containers when using Nodes, where instead of having one ViewGroup + * containing a large number of draw commands (and thus being more expensive in the case of + * an invalidate or re-draw), we split them up into several draw commands. + */ + public boolean shouldPromoteGrandchildren() { + return false; + } }