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";
|
const char ViewComponentName[] = "View";
|
||||||
|
|
||||||
bool ViewShadowNode::isLayoutOnly() const {
|
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_);
|
const auto &viewProps = *std::static_pointer_cast<const ViewProps>(props_);
|
||||||
|
|
||||||
return
|
return
|
||||||
|
viewProps.collapsable &&
|
||||||
// Event listeners
|
// Event listeners
|
||||||
!viewProps.onLayout &&
|
!viewProps.onLayout &&
|
||||||
// Generic Props
|
// Generic Props
|
||||||
|
@ -33,7 +30,6 @@ bool ViewShadowNode::isLayoutOnly() const {
|
||||||
viewProps.transform == Transform{} && viewProps.zIndex == 0 &&
|
viewProps.transform == Transform{} && viewProps.zIndex == 0 &&
|
||||||
// Layout Metrics
|
// Layout Metrics
|
||||||
getLayoutMetrics().borderWidth == EdgeInsets{};
|
getLayoutMetrics().borderWidth == EdgeInsets{};
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace react
|
} // namespace react
|
||||||
|
|
Loading…
Reference in New Issue