gaaclarke e6b3c034ea [Impeller] sped up the linear gradient by moving calculations to the cpu (flutter/engine#53007)
issue: https://github.com/flutter/flutter/issues/148496

The linked issue showed us as ALU bound with the linear gradient, this should relieve some of that pressure.

Tests:  There is already existing golden tests for this, this just changed the performance, no new functionality.

## summary of math improvements:
- (num_colors - 1) * division -> multiplication
- (num_colors - 1) * subtractions removed
- removes 1 `dot()`
- 1 division -> multiplication
- 1 subtraction removed

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-05-24 17:40:53 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%