Skip to content

Commit

Permalink
prepare drawPoints MaskFilter test for Skia bug fix (flutter#28596)
Browse files Browse the repository at this point in the history
  • Loading branch information
flar authored Sep 14, 2021
1 parent d65cba9 commit af618ee
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions flow/display_list_canvas_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,17 +334,33 @@ class CanvasCompareTester {
sk_sp<SkMaskFilter> filter =
SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 5.0);
{
RenderWith([=](SkCanvas*, SkPaint& p) { p.setMaskFilter(filter); },
[=](DisplayListBuilder& b) { b.setMaskFilter(filter); },
cv_renderer, dl_renderer, "MaskFilter == Blur 5");
RenderWith(
[=](SkCanvas*, SkPaint& p) {
// Provide some non-trivial stroke size to get blurred
p.setStrokeWidth(3.0);
p.setMaskFilter(filter);
},
[=](DisplayListBuilder& b) {
// Provide some non-trivial stroke size to get blurred
b.setStrokeWidth(3.0);
b.setMaskFilter(filter);
},
cv_renderer, dl_renderer, "MaskFilter == Blur 5");
}
ASSERT_TRUE(filter->unique()) << "MaskFilter Cleanup";
{
RenderWith([=](SkCanvas*, SkPaint& p) { p.setMaskFilter(filter); },
[=](DisplayListBuilder& b) {
b.setMaskBlurFilter(kNormal_SkBlurStyle, 5.0);
},
cv_renderer, dl_renderer, "MaskFilter == Blur(Normal, 5.0)");
RenderWith(
[=](SkCanvas*, SkPaint& p) {
// Provide some non-trivial stroke size to get blurred
p.setStrokeWidth(3.0);
p.setMaskFilter(filter);
},
[=](DisplayListBuilder& b) {
// Provide some non-trivial stroke size to get blurred
b.setStrokeWidth(3.0);
b.setMaskBlurFilter(kNormal_SkBlurStyle, 5.0);
},
cv_renderer, dl_renderer, "MaskFilter == Blur(Normal, 5.0)");
}
ASSERT_TRUE(filter->unique()) << "MaskFilter Cleanup";
}
Expand Down

0 comments on commit af618ee

Please sign in to comment.