mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[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:
parent
6e4ab692e7
commit
8d8fc753af
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user