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

Conversation

@jonahwilliams
Copy link
Contributor

Ship it?

@flutter-dashboard
Copy link

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;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to override this so we get a context for image decoding.

/// 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;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBD what sort of promise we want to make with this flag.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is how things already work.

Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@bdero
Copy link
Member

bdero commented Jun 7, 2023

No strong opinions about landing this flag, but this is double ultra unstable until we get the embedder unittest harness working with Impeller.

@jonahwilliams
Copy link
Contributor Author

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;
Copy link
Member

Choose a reason for hiding this comment

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

Should we set enable_impeller to false explicitly on Windows and Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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_;
Copy link
Contributor

Choose a reason for hiding this comment

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

(this is fine because it's set up in the ctor)

@zanderso
Copy link
Member

zanderso commented Jun 8, 2023

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 ||
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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).";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an error log here to match the other backends

@jonahwilliams
Copy link
Contributor Author

embedder.h API change reverted.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 12, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 12, 2023
jonahwilliams pushed a commit to flutter/flutter that referenced this pull request Jun 12, 2023
…128738)

flutter/engine@12def73...1714d73

2023-06-12 [email protected] Roll Fuchsia Mac SDK from
FreETK3TrhkNzCCL-... to J-zU9HGYXYU5UWJO9... (flutter/engine#42784)
2023-06-12 [email protected] [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 [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://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
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

Fantastic! 🚀

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

LGTM

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 needs tests platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants