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:
parent
95afdd8bb3
commit
74a00beeb7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue