mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This improves performance by avoiding the 2-pass Gaussian blur in more shadow drawing situations. The new golden also serves as a good reference for how mask blurs are supposed to work alongside various other paint properties such as color filters, color opacity, image filters, and blending.  The top 5 shapes are various RRect cases and are rendering correctly via the new blur style implementation in this patch. The two bottom rows (the triangles and arcs) are non-rrect paths, so they're falling back to rendering using the 2-pass Gaussian blur. Rendering errors are circled in red below:  * Cases 1, 2, 7, and 9 all appear to rendering fine. * Cases 3, 4, 5, and 6 all have mask blur styles set to `BlurStyle::kSolid`. After the first clipped overlay has been drawn, subsequent clipped overlays aren't drawing. * Case 6 is also has the blend mode set to `BlendMode::kExclusion`. * Cases 8 and 10 are rendering with `BlurStyle::kInner` and `BlurStyle::kOuter` respectfully, but with a blur ImageFilter also set on the paint state. The ImageFilter needs to be applied to the rasterized mask blurred content.