Skip to content

Made MetalSDF a printed name when sdf's are enabled.#185504

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
gaaclarke:print-metalsdf
Apr 24, 2026
Merged

Made MetalSDF a printed name when sdf's are enabled.#185504
auto-submit[bot] merged 1 commit into
flutter:masterfrom
gaaclarke:print-metalsdf

Conversation

@gaaclarke

Copy link
Copy Markdown
Member

This makes it easier to know when you are using SDFs or not.

Pre-launch Checklist

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

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@gaaclarke gaaclarke added the CICD Run CI/CD label Apr 23, 2026
@gaaclarke gaaclarke requested review from andywolff and flar April 23, 2026 23:06
@github-actions github-actions Bot added the engine flutter/engine related. See also e: labels. label Apr 23, 2026

@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 updates the logging in embedder_surface_metal_impeller.mm to reflect the use of Signed Distance Fields (SDFs). A review comment points out that the variable impeller_flags is undefined in the scope, which will lead to a compilation error, and suggests refactoring the log statement to eliminate string duplication.

Comment on lines +52 to +56
if (impeller_flags.use_sdfs) {
FML_LOG(IMPORTANT) << "Using the Impeller rendering backend (MetalSDF).";
} else {
FML_LOG(IMPORTANT) << "Using the Impeller rendering backend (Metal).";
}

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.

high

The variable impeller_flags is not defined in this scope, which will cause a compilation error. Additionally, the log message can be simplified using a ternary operator to avoid duplicating the string literal, which improves maintainability and adheres to the style guide's recommendation to avoid duplicating state (Rule 35).

  FML_LOG(IMPORTANT) << "Using the Impeller rendering backend (Metal" << (impeller_flags.use_sdfs ? "SDF" : "") << ").";
References
  1. Avoid duplicating state: Keep only one source of truth. (Rule 35) (link)
  2. Suggest simplification and refactoring: Assess whether the code can be made simpler or refactored to enhance readability and maintainability. (Rule 30) (link)

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.

Ummm... gem? You having a bad day?

@flar flar 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.

LGTM

Comment on lines +52 to +56
if (impeller_flags.use_sdfs) {
FML_LOG(IMPORTANT) << "Using the Impeller rendering backend (MetalSDF).";
} else {
FML_LOG(IMPORTANT) << "Using the Impeller rendering backend (Metal).";
}

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.

Ummm... gem? You having a bad day?

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 24, 2026

@andywolff andywolff 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.

LGTM

Merged via the queue into flutter:master with commit b24aabf Apr 24, 2026
199 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 24, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 24, 2026
flutter/flutter@aeb9623...3100188

2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 1c9b0b9141e9 to 63dbf37c3700 (1 revision) (flutter/flutter#185533)
2026-04-24 30870216+gaaclarke@users.noreply.github.com Made MetalSDF a printed name when sdf's are enabled. (flutter/flutter#185504)
2026-04-24 30870216+gaaclarke@users.noreply.github.com Made the MIT matcher not greedy and added a boost file matcher (flutter/flutter#185491)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…#11579)

flutter/flutter@aeb9623...3100188

2026-04-24 engine-flutter-autoroll@skia.org Roll Skia from 1c9b0b9141e9 to 63dbf37c3700 (1 revision) (flutter/flutter#185533)
2026-04-24 30870216+gaaclarke@users.noreply.github.com Made MetalSDF a printed name when sdf's are enabled. (flutter/flutter#185504)
2026-04-24 30870216+gaaclarke@users.noreply.github.com Made the MIT matcher not greedy and added a boost file matcher (flutter/flutter#185491)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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

CICD Run CI/CD engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants