[Impeller] allowing enabling Impeller on macOS.#42639
[Impeller] allowing enabling Impeller on macOS.#42639auto-submit[bot] merged 5 commits intoflutter:mainfrom
Conversation
|
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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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. |
| bool PresentTexture(GPUMTLTextureInfo texture) const override; | ||
|
|
||
| // |EmbedderSurface| | ||
| std::shared_ptr<impeller::Context> CreateImpellerContext() const override; |
There was a problem hiding this comment.
Need to override this so we get a context for image decoding.
shell/platform/embedder/embedder.h
Outdated
| /// If true, the Impeller rendering backend will be enabled. It is the callers | ||
| /// responsibility to verify that Impeller supports the currently selected | ||
| /// backend. | ||
| bool enable_impeller; |
There was a problem hiding this comment.
TBD what sort of promise we want to make with this flag.
There was a problem hiding this comment.
I thought the idea was to loudly crash if someone asks for impeller and it can't work. Ideally also stop things in the tooling if they ask for it on an unsupported platform.
There was a problem hiding this comment.
That is how things already work.
There was a problem hiding this comment.
I missed this on initial review. I don't think we should add this flag because it will inevitably become outdated. Perhaps just allow it to be enabled through command_line_argv?
There was a problem hiding this comment.
I agree with @bdero. This is a flag that will only be valid in the interim during the transition. Piping it through the command line args makes more sense to me. We will also be able to flip the default at our convenience.
|
No strong opinions about landing this flag, but this is double ultra unstable until we get the embedder unittest harness working with Impeller. |
|
Yeah we can wait to talk about this one a bit. Though we can keep it a bit more stable by enabling a CI machine with a simple unit test |
|
|
||
| FlutterProjectArgs flutterArguments = {}; | ||
| flutterArguments.struct_size = sizeof(FlutterProjectArgs); | ||
| flutterArguments.enable_impeller = _project.enableImpeller; |
There was a problem hiding this comment.
Should we set enable_impeller to false explicitly on Windows and Linux?
There was a problem hiding this comment.
I don't think it matters. We'll keep the default false until we have all backends wired up and tested
| } | ||
|
|
||
| std::shared_ptr<impeller::Context> EmbedderSurfaceMetalImpeller::CreateImpellerContext() const { | ||
| return context_; |
There was a problem hiding this comment.
(this is fine because it's set up in the ctor)
|
From PR triage: This will wait for any feedback from @chinmaygarde when he is back from OOO. |
| std::vector<std::string> switches = self.switches; | ||
|
|
||
| // Enable Impeller only if specifically asked for from the project or cmdline arguments. | ||
| if (_project.enableImpeller || |
There was a problem hiding this comment.
Moved to only using switches
| std::make_shared<fml::SyncSwitch>(false), // is_gpu_disabled_sync_switch | ||
| "Impeller Library" // library_label | ||
| ); | ||
| FML_LOG(ERROR) << "Using the Impeller rendering backend (Metal)."; |
There was a problem hiding this comment.
Added an error log here to match the other backends
|
embedder.h API change reverted. |
flutter/engine@12def73...1714d73 2023-06-12 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from FreETK3TrhkNzCCL-... to J-zU9HGYXYU5UWJO9... (flutter/engine#42784) 2023-06-12 jonahwilliams@google.com [Impeller] allowing enabling Impeller on macOS. (flutter/engine#42639) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from FreETK3TrhkN to J-zU9HGYXYU5 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 jacksongardner@google.com,rmistry@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Ship it?