Revert "Avoid division by zero in sweep gradient calculation"
This reverts commit 49e7eadb1edf9abd76b9869e1083a7594db3f74f.
Reason for revert: Breaking the Chrome roll.
Original change's description:
> Avoid division by zero in sweep gradient calculation
>
> Resolve with same solution as in other gradient cases: When the color
> stops are compressed to one point, add an extra color stop at the last
> stop offset +1 with the color of the last stop. That paints the
> equivalent gradient but achieves creating a valid 0, 1 interval for the
> shader.
>
> When the angles collapse to 0 as well in mode pad (where we can draw
> such gradients), care needs to be taken to not invert the order of the
> color stop - handle that with a flag that checks whether a color stop
> was inserted.
>
> Bug: oss-fuzz:55906
> Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts
> Change-Id: Icf1100127872b7436197ba6571367a99d455c335
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/646416
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: oss-fuzz:55906
Change-Id: I697b9d98ca0b5f8d8dde360c57bc7b869677f152
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/653916
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2 files changed