Enabled View falttening for Android builds

Summary: This diff enables view flattening for Android when using Fabric.

Reviewed By: shergin

Differential Revision: D10254678

fbshipit-source-id: cc7acaa38a6d01e112ba0e8a92db61cdeefbffee
This commit is contained in:
David Vacca 2018-10-09 16:30:09 -07:00 committed by Facebook Github Bot
parent 95afdd8bb3
commit 74a00beeb7
1 changed files with 1 additions and 5 deletions

View File

@ -13,13 +13,10 @@ namespace react {
const char ViewComponentName[] = "View";
bool ViewShadowNode::isLayoutOnly() const {
#ifdef ANDROID
// This feature is not properly tested on Android yet.
return false;
#else
const auto &viewProps = *std::static_pointer_cast<const ViewProps>(props_);
return
viewProps.collapsable &&
// Event listeners
!viewProps.onLayout &&
// Generic Props
@ -33,7 +30,6 @@ bool ViewShadowNode::isLayoutOnly() const {
viewProps.transform == Transform{} && viewProps.zIndex == 0 &&
// Layout Metrics
getLayoutMetrics().borderWidth == EdgeInsets{};
#endif
}
} // namespace react