Brandon DeRosier 09246795b0 [Impeller] Correct advanced blending behavior. (flutter/engine#43283)
Investigated as part of
https://github.com/flutter/flutter/issues/127232.

This took some time to work out, but:
* The amount of blending applied to the source color needs to be
weighted by the destination alpha, which is pretty sensible behavior.
This is in addition to applying source-over behavior with the resulting
blended color.
* All of the blend functions assume that the color is already
premultiplied, so remove the unpremultiply/premultiply surrounding the
blend call.

All of the blend modes now visually match up with the [Flutter
docs](https://api.flutter.dev/flutter/dart-ui/BlendMode.html), except
for ColorBurn and Saturation, which appear to have a slight
miscalculation going on with the red channel.
2023-06-27 16:04:41 -07:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%