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

Conversation

@chinmaygarde
Copy link
Contributor

@chinmaygarde chinmaygarde commented Oct 10, 2024

Addresses flutter/flutter#155541

This does not remove Skia itself from the build. I'll stage that in a followup. Want to keep the scope of this patch small.

This is the new behavior:

  • Impeller is the default on iOS devices and simulators.
  • On iOS devices only, all flags and plist options are ignored.
  • On iOS simulators only, Flutter will used Impeller's Metal backend by default and fallback to the Null backend if Metal device access is not available.
  • On iOS simulators only, Flutter can pick Skia using the command line flags or plist flags. This is to allow users one more month to migrate as communicated by @zanderso.

The settings objects enable_impeller field is now static constexpr to avoid accidentally disabling the flag while it still exists.

@zanderso
Copy link
Member

iOS scenario app tests are hitting:

2024-10-10 12:01:25.156206-0700 IosUnitTests[27328:171650] [FATAL:flutter/shell/common/shell.cc(444)] Check failed: !settings.enable_software_rendering || !settings.enable_impeller. Software rendering is incompatible with Impeller.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

Did flutter/flutter#149652 get addressed yet?

}
}
#if FML_OS_IOS_SIMULATOR
// Fallback to Skia which itself falls back to software rendering on simulators that cannot
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI @zanderso what is the plan with the no-op backend?

I think we need to respect the enable impeller setting here and use the no-op backend if there is no mtl device. otherwise we're actually forcing folks to use skia that may have already opted in

Copy link
Member

@zanderso zanderso Oct 10, 2024

Choose a reason for hiding this comment

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

Yeah, I hadn't considered that folks might have already removed the opt-out who are on simulator without Metal. Ignoring the flag and making them use Skia would be the opposite of what we're overall trying to do. Simulator should just continue to respect the flag for now. (But we should still remove the unit tests that explicitly try to target the software backend, I think?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, the no-op backend will automatically get selected on sims if we enable Impeller but there is no Metal device?

Copy link
Contributor

Choose a reason for hiding this comment

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

@chinmaygarde
Copy link
Contributor Author

chinmaygarde commented Oct 10, 2024

Some updates based on our conversation. Please ignore the behavior I noted in the original commit message. I am going to amend it before committing.

  • Impeller is the default on iOS devices and simulators.
  • On iOS device only, all flags and plist options are ignored.
  • On iOS simulators only, Flutter will used Impeller's Metal backend by default and fallback to the Null backend if Metal device access is not available.
  • On iOS simulators only, Flutter can pick Skia using the command line flags or plist flags. This is to allow users one more month to migrate as communicated by @zanderso.

There was one test that explicitly tested opting into software rendering. That has been removed as that option was there for folks who found the OpenGL renderer too slow. This hasn't been an issue for a while and we should remove the option altogether.

Did I miss anything?

@chinmaygarde
Copy link
Contributor Author

Did flutter/flutter#149652 get addressed yet?

Not yet @jonahwilliams. I'm working on it now. @zanderso wanted to get this patch in prep. and it a good thing too because this was more confusing than I initially expected.

@zanderso
Copy link
Member

Still have some tests failing on simulator.

@chinmaygarde
Copy link
Contributor Author

Yup, I'm patching now.

@chinmaygarde
Copy link
Contributor Author

The subprocess.TimeoutExpired: Command '['xcodebuild', '-showsdks', '-json']' timed out after 300 seconds errors are really rough. I'm having to retry quite a bit.

@chinmaygarde
Copy link
Contributor Author

I keep getting the same errors as #55808 (comment) on retries. Tried those builds locally and everything seems good. Hopefully unblocked once the CI issues are addressed.

@zanderso
Copy link
Member

zanderso commented Oct 11, 2024

This should land today. Can the fix for flutter/flutter#149652 land as a follow-up if it is not ready yet?

@jonahwilliams
Copy link
Contributor

We should fix the bugs we said we would fix before we remove the ability to work around them

@zanderso
Copy link
Member

I keep getting the same errors as #55808 (comment) on retries. Tried those builds locally and everything seems good. Hopefully unblocked once the CI issues are addressed.

#55818 may help.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

Discussed offline. We will still pursue the linked bug as a high priority followup.

Addresses flutter/flutter#155541

This does **not** remove Skia itself from the build. I'll stage that in
a followup. Want to keep the scope of this patch small.

This is the new behavior:

* On iOS hardware **and** simulators, the engine flag (`--enable-impeller`) to toggle Impeller will be ignored.
* On iOS hardware **and** simulators, the PList flag (`FLTEnableImpeller`) to toggle Impeller will be ignored.
* On iOS hardware **and** simulators, the default renderer is Impeller.
* On iOS simulators **only**, running on emulated environments without access to a Metal device will fallback to Skia with software rendering.

The settings objects enable_impeller field is not static constexpr to avoid accidentally disabling the flag while it still exists.
@zanderso zanderso added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 15, 2024
@auto-submit auto-submit bot merged commit 7509de8 into flutter:main Oct 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 15, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 15, 2024
flutter/engine@107ea8b...7509de8

2024-10-15 chinmaygarde@google.com [Impeller] Ignore opt-outs on iOS devices. (flutter/engine#55808)
2024-10-15 skia-flutter-autoroll@skia.org Roll Skia from baf314b72924 to 539ab9d39812 (3 revisions) (flutter/engine#55879)
2024-10-15 jonahwilliams@google.com [Impeller] remove extra copy from drawPoints. (flutter/engine#55872)

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 jonahwilliams@google.com,zra@google.com 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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
Addresses flutter#155541

This does **not** remove Skia itself from the build. I'll stage that in a followup. Want to keep the scope of this patch small.

This is the new behavior:

* Impeller is the default on iOS devices **and** simulators.
* On iOS devices **only**, all flags and plist options are ignored.
* On iOS simulators **only**, Flutter will used Impeller's Metal backend by default and fallback to the Null backend if Metal device access is not available.
* On iOS simulators **only**, Flutter can pick Skia using the command line flags or plist flags. This is to allow users one more month to migrate as communicated by @zanderso.

The settings objects `enable_impeller` field is now `static constexpr` to avoid accidentally disabling the flag while it still exists.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants