Skip to content

[flutter_svg] Add golden widget tests for SVG alpha masks - #13245

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
edwin-hollen:upstream-svg-alpha-mask-goldens
Oct 15, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
edwin-hollen:upstream-svg-alpha-mask-goldens

Conversation

@edwin-hollen

@edwin-hollen edwin-hollen commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Adds golden widget tests in flutter_svg for SVG alpha masks (mask-type="alpha" and style="mask-type:alpha") and bumps the vector_graphics_compiler dependency constraint to ^1.3.1.

Follow-up to #13025
Part of flutter/flutter#158734

Added Golden Tests

  • alpha_mask.opaque_style.png: Opaque #000000 mask using inline CSS style="mask-type:alpha".
  • alpha_mask.fill_opacity.png: Semi-transparent mask using mask-type="alpha" and fill-opacity="0.5".
  • alpha_mask.group_opacity.png: Group opacity inside an alpha mask (<mask mask-type="alpha"><g opacity="0.5">...</g></mask>).
  • alpha_mask.gradient.png: Linear gradient alpha mask fading stop-opacity from 1 to 0.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@edwin-hollen
edwin-hollen force-pushed the upstream-svg-alpha-mask-goldens branch from 021aa09 to 7f2d556 Compare October 13, 2026 21:43
@edwin-hollen
edwin-hollen marked this pull request as ready for review October 13, 2026 21:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for SVG alpha masks (mask-type="alpha") to the flutter_svg package. It updates the package version to 2.3.1 and the vector_graphics_compiler dependency to ^1.3.1. Additionally, it includes new widget tests to verify the alpha mask functionality, covering opaque, semi-transparent, group opacity, and gradient scenarios. I have no feedback to provide.

@edwin-hollen

Copy link
Copy Markdown
Contributor Author

@gaaclarke for visibility. Follow-up to #13025 with the flutter_svg golden tests.

@gaaclarke
gaaclarke self-requested a review October 13, 2026 21:47
@github-actions github-actions Bot added p: flutter_svg triage-engine Should be looked at in engine triage labels Oct 13, 2026

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't there some images that need to be checked in too?

@gaaclarke gaaclarke added the CICD Run CI/CD label Oct 14, 2026
@edwin-hollen

Copy link
Copy Markdown
Contributor Author

Hi Greg, I checked these in with #13025 under third_party/packages/flutter_svg/test/golden_widget/, let me know if I need to change that in this PR. Thanks!

@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Oct 15, 2026
@gaaclarke gaaclarke added the CICD Run CI/CD label Oct 15, 2026

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks gemini

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 15, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 15, 2026
@auto-submit

auto-submit Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/13245, because This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a member of flutter-hackers before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@b-luk b-luk added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 15, 2026
@auto-submit
auto-submit Bot merged commit e61994c into flutter:main Oct 15, 2026
14 checks passed
gmackall pushed a commit to gmackall/flutter that referenced this pull request Oct 16, 2026
flutter/packages@da40eaf...93eede7

2026-10-16 [email protected] [camera]fix a
crash when switching camera while recording due to disconnected
capturePhotoOputput (flutter/packages#13248)
2026-10-16 [email protected] [various] Update iOS example apps to
the 15.0 deployment target (flutter/packages#13223)
2026-10-16 [email protected] [material_ui]
Add M3E `IconButton` example (flutter/packages#13085)
2026-10-15 [email protected] [ci] Increase deprecation check minimum to
iOS 16 (flutter/packages#13211)
2026-10-15 [email protected] [google_sign_in] Remove the
public iOS handleOpen helper (flutter/packages#13273)
2026-10-15 [email protected] [google_fonts] Make the pendingFonts
test deterministic (flutter/packages#13262)
2026-10-15 [email protected]
[vector_graphics_compiler] Fix tspan transform applied twice
(flutter/packages#13129)
2026-10-15 [email protected] Roll Flutter from
426be96 to 5c7e45a (21 revisions) (flutter/packages#13270)
2026-10-15 [email protected] [flutter_svg]
Add golden widget tests for SVG alpha masks (flutter/packages#13245)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
flutter/packages@da40eaf...93eede7

2026-10-16 [email protected] [camera]fix a
crash when switching camera while recording due to disconnected
capturePhotoOputput (flutter/packages#13248)
2026-10-16 [email protected] [various] Update iOS example apps to
the 15.0 deployment target (flutter/packages#13223)
2026-10-16 [email protected] [material_ui]
Add M3E `IconButton` example (flutter/packages#13085)
2026-10-15 [email protected] [ci] Increase deprecation check minimum to
iOS 16 (flutter/packages#13211)
2026-10-15 [email protected] [google_sign_in] Remove the
public iOS handleOpen helper (flutter/packages#13273)
2026-10-15 [email protected] [google_fonts] Make the pendingFonts
test deterministic (flutter/packages#13262)
2026-10-15 [email protected]
[vector_graphics_compiler] Fix tspan transform applied twice
(flutter/packages#13129)
2026-10-15 [email protected] Roll Flutter from
426be96 to 5c7e45a (21 revisions) (flutter/packages#13270)
2026-10-15 [email protected] [flutter_svg]
Add golden widget tests for SVG alpha masks (flutter/packages#13245)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: flutter_svg triage-engine Should be looked at in engine triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants