[devicelab] fix NAN/Inf in drawPoints benchmark. (#132526)

This is causing the benchmark to not render with Skia. We probably need to CHECK this somewhere in the backend..
This commit is contained in:
Jonah Williams 2023-08-14 15:57:58 -07:00 committed by GitHub
parent 9a39a5d697
commit a077189581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,10 +72,10 @@ class PointsPainter extends CustomPainter {
}
canvas.drawPaint(Paint()..color = Colors.white);
for (int i = 0; i < 8; i++) {
final double x = ((size.width / i) + tick) % size.width;
final double x = ((size.width / (i + 1)) + tick) % size.width;
for (int j = 0; j < data.length; j += 2) {
data[j] = x;
data[j + 1] = (size.height / j) + 200;
data[j + 1] = (size.height / (j + 1)) + 200;
}
final Paint paint = Paint()
..color = kColors[i]