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

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented May 20, 2022

Relands #33461

The patch was previously reverted because of a mistake in the embedder code: I had transposed the position of the render_to_surface argument and the msaa_samples argument, and C++ did an implicit int to bool conversion which broke everything on desktop.

I've manually verified that desktop works, and I've switched to using an enum everywhere for the MSAA sample count argument so that the type error won't happen again.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@dnfield dnfield requested review from chinmaygarde and cyanglaz May 20, 2022 04:18
@flutter-dashboard flutter-dashboard bot added embedder Related to the embedder API platform-ios labels May 20, 2022
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.

RSLGTM

@dnfield dnfield added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label May 20, 2022
Comment on lines +47 to +48
auto surface = std::make_unique<GPUSurfaceMetalSkia>(this, main_context_, MsaaSampleCount::kNone,
render_to_surface);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Specifically, in the previous version of this patch I wrote

auto surface = std::make_unique<GPUSurfaceMetalSkia>(this, main_context_, render_to_surface, 1);

Which meant render_to_surface was always true, which is the wrong thing to do (and caused the blank screen rendering).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the enum everywhere means that wouldn't even compile now.

return weak_factory->GetWeakPtr();
}

- (void)testMsaaSampleCount {
Copy link
Contributor

Choose a reason for hiding this comment

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

Test needs to be updated to use the enum

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Mac Unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label May 20, 2022
@dnfield dnfield added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label May 20, 2022
@fluttergithubbot fluttergithubbot merged commit acd0624 into flutter:main May 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 20, 2022
@dnfield dnfield deleted the mtl_msaa branch May 20, 2022 18:34
houhuayong pushed a commit to houhuayong/engine that referenced this pull request Jun 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

embedder Related to the embedder API platform-ios waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants