Rewrite ES2 loop-test conditions that use !=.
These tests are now rewritten to use < or > operators. This fixes
loop-termination issues with loops like this:
for (float x = 1.0; x != 0.0; x -= 0.01) {...}
This loop could fail to terminate in SkRP due to rounding error
incurred by repeated subtraction.
Note that other classes of rounding error still exist in this
logic. Very large starting values combined with relatively small
deltas are likely to need a separate fix.
Bug: oss-fuzz:58302
Change-Id: I31838c88b6a5612cf83341590ceb322fe4b88916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/678696
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 files changed