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

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Aug 21, 2024

Still needs to be tested in metalless environment. This should probably print out some kind of error message that tells folks that this is WAI, but I'm not sure if that would be too disruptive for g3.

Fixes flutter/flutter#153883

@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, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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

jonahwilliams added 3 commits August 21, 2024 15:25

namespace flutter {

class GPUSurfaceNoop : public Surface {
Copy link
Contributor

Choose a reason for hiding this comment

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

A short docstring saying something like "Accepts rendering intent but doesn't render anything. Useful for tests that don't care about checking rendering output but still need to run a Flutter app." Or something like that.

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

// |Surface|
std::shared_ptr<impeller::AiksContext> GetAiksContext() const override;

FML_DISALLOW_COPY_AND_ASSIGN(GPUSurfaceNoop);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here and elsewhere, avoid using the macros.

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

Copy link
Contributor

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

The creation of the context happens in

static id<MTLDevice> CreateMetalDevice() {
. Perhaps (in simulator builds only) we can add a hook for tests to return nullptr from there to test the fallback logic?

@jonahwilliams
Copy link
Contributor Author

I don't think overriding it at that location would be sufficient, nor would a unit test cover it.

@jonahwilliams
Copy link
Contributor Author

jonahwilliams commented Aug 22, 2024

I think no matter what we do, we can't really be certain thtat it works for all of the various engine APIS. for example, what happens if the noop surface is asked to use the snapshot controller? or upload an image. Today we may count on that falling back to software.

I'd rather not spin up an entire new test shard for this. Maybe we land and then explore the impact in g3?

jonahwilliams added 2 commits August 22, 2024 17:28
@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 23, 2024
@auto-submit auto-submit bot merged commit ba1168f into flutter:main Aug 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 23, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 23, 2024
flutter/engine@41f539f...ba1168f

2024-08-23 jonahwilliams@google.com [Engine] Add no op surface (flutter/engine#54694)
2024-08-23 jonahwilliams@google.com [engine] make Platform thread the UI thread for iOS Impeller. (flutter/engine#54655)
2024-08-23 mdebbar@google.com [web] Multi-view support for Skwasm (flutter/engine#48893)

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 jimgraham@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://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
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…4020)

flutter/engine@41f539f...ba1168f

2024-08-23 jonahwilliams@google.com [Engine] Add no op surface (flutter/engine#54694)
2024-08-23 jonahwilliams@google.com [engine] make Platform thread the UI thread for iOS Impeller. (flutter/engine#54655)
2024-08-23 mdebbar@google.com [web] Multi-view support for Skwasm (flutter/engine#48893)

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 jimgraham@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://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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Impeller] Prepare a null GPU backend.

2 participants