Unverified Commit a0771895 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[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..
parent 9a39a5d6
...@@ -72,10 +72,10 @@ class PointsPainter extends CustomPainter { ...@@ -72,10 +72,10 @@ class PointsPainter extends CustomPainter {
} }
canvas.drawPaint(Paint()..color = Colors.white); canvas.drawPaint(Paint()..color = Colors.white);
for (int i = 0; i < 8; i++) { 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) { for (int j = 0; j < data.length; j += 2) {
data[j] = x; data[j] = x;
data[j + 1] = (size.height / j) + 200; data[j + 1] = (size.height / (j + 1)) + 200;
} }
final Paint paint = Paint() final Paint paint = Paint()
..color = kColors[i] ..color = kColors[i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment