Avoid extra work when justifyContent is FLEX_START
Remaining space and between space only need to be updated when justifyContent is not FLEX_START.
This commit is contained in:
@@ -833,7 +833,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, css_direction
|
||||
|
||||
// We use justifyContent to figure out how to allocate the remaining
|
||||
// space available
|
||||
} else {
|
||||
} else if (node->style.justify_content != CSS_JUSTIFY_FLEX_START) {
|
||||
css_justify_t justifyContent = node->style.justify_content;
|
||||
if (justifyContent == CSS_JUSTIFY_CENTER) {
|
||||
leadingMainDim = remainingMainDim / 2;
|
||||
|
Reference in New Issue
Block a user