[Impeller] Do not skip rendering when mask blur is zero (flutter/engine#49342)

The original fix had a bad return value that caused the rendering to abort rather than proceed normally without the blurring.

I also changed the color being used so that the contents would show up in golden diffs which use a white background for unrendered pixels.
This commit is contained in:
Jim Graham 2023-12-21 13:59:50 -08:00 committed by GitHub
parent 6e4ab692e7
commit 8d8fc753af
2 changed files with 2 additions and 2 deletions

View File

@ -3768,7 +3768,7 @@ TEST_P(AiksTest, MaskBlurWithZeroSigmaIsSkipped) {
Canvas canvas;
Paint paint = {
.color = Color::White(),
.color = Color::Blue(),
.mask_blur_descriptor =
Paint::MaskBlurDescriptor{
.style = FilterContents::BlurStyle::kNormal,

View File

@ -281,7 +281,7 @@ bool Canvas::AttemptDrawBlurredRRect(const Rect& rect,
}
// A blur sigma that is close to zero should not result in any shadow.
if (std::fabs(paint.mask_blur_descriptor->sigma.sigma) <= kEhCloseEnough) {
return true;
return false;
}
Paint new_paint = paint;