use_is_even_rather_than_modulo (#68301)
This commit is contained in:
committed by
GitHub
parent
3393566b56
commit
c0176c9ee5
@@ -69,7 +69,7 @@ class BenchUpdateManyChildLayers extends SceneBuilderRecorder {
|
||||
final double offsetY = row * cellSize.height;
|
||||
// Retain every other layer, so we exercise the update path 50% of the
|
||||
// time and the retain path the other 50%.
|
||||
final bool shouldRetain = oldLayer != null && (row + col) % 2 == 0;
|
||||
final bool shouldRetain = oldLayer != null && (row + col).isEven;
|
||||
if (shouldRetain) {
|
||||
sceneBuilder.addRetained(oldLayer);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user