-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove #if SHELL_ENABLE_METAL checks in darwin code #51947
Conversation
All physical iOS devices Flutter supports (iOS 12+) can run Metal. The only time Flutter doesn't use Metal afaik is for iOS simulators running < iOS 13, which is covered by a few `if (@available(iOS METAL_IOS_VERSION_BASELINE, *))` checks. https://github.com/flutter/engine/blob/8a51e124fbf168295a1b05f8d66459bfb29ae8a9/shell/platform/darwin/ios/rendering_api_selection.h#L37-L41 Remove hardware checks for physical devices. Remove `shell_enable_metal` from the gn files and the `#if SHELL_ENABLE_METAL` checks in the iOS embedder. I limited this PR to just iOS, but I imagine it's safe to remove `shell_enable_metal` everywhere? https://github.com/flutter/engine/blob/41da00ac46bc38a97a63ed0635450271d71afd9f/shell/platform/darwin/macos/BUILD.gn#L18 https://github.com/flutter/engine/blob/41da00ac46bc38a97a63ed0635450271d71afd9f/tools/gn#L673-L679
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
| enable_software = true | ||
| enable_gl = true | ||
| enable_vulkan = false | ||
| enable_metal = shell_enable_metal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new.
| namespace flutter { | ||
|
|
||
| #if SHELL_ENABLE_METAL | ||
| bool ShouldUseMetalRenderer() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep ShouldUseMetalRenderer() logic in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…146468) flutter/engine@8701a9a...932c550 2024-04-08 [email protected] Remove #if SHELL_ENABLE_METAL checks in darwin code (flutter/engine#51947) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[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
…lutter#146468) flutter/engine@8701a9a...932c550 2024-04-08 [email protected] Remove #if SHELL_ENABLE_METAL checks in darwin code (flutter/engine#51947) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[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
Same as #51636 except:
MTLCreateSystemDefaultDevice()fails. Re-add thatMTLCreateSystemDefaultDevicecheckhttps://github.com/flutter/engine/pull/51636/files#diff-1db60a8a74c1cfb40c970541dd1f7f0f6301853a2ba17451f5117f154036d732L22-L31
enable_metalto always true formacos/BUILD.gnPre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.