Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f22f02e

Browse files
Kingtous金韬
authored and
金韬
committed
opt: add save/restore to canvas golden test
1 parent 9c48c87 commit f22f02e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/web_ui/test/html/compositing/canvas_mask_filter_golden_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,22 @@ Future<void> testMain() async {
162162

163163
final SurfacePaint paint = SurfacePaint()
164164
..maskFilter = const ui.MaskFilter.blur(ui.BlurStyle.normal, 5);
165+
rc.save();
165166
rc.drawCircle(const ui.Offset(150, 150), 100,
166167
paint..color = const ui.Color(0xFFC8C800));
168+
rc.restore();
169+
rc.save();
167170
rc.drawCircle(const ui.Offset(150, 150), 50,
168171
paint..color = const ui.Color(0xFFC800C8));
172+
rc.restore();
173+
rc.save();
169174
rc.drawCircle(
170175
const ui.Offset(150, 150),
171176
20,
172177
paint
173178
..color = const ui.Color(0xFF00C8C8)
174179
..maskFilter = const ui.MaskFilter.blur(ui.BlurStyle.normal, 10));
180+
rc.restore();
175181

176182
await canvasScreenshot(rc, 'multiple_mask_filter_$browser',
177183
region: screenRect);

0 commit comments

Comments
 (0)