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 Mar 18, 2022

Enables MSAA behind a flag for Android GL backend.

Part of flutter/flutter#100392

Takes a sample count as an argument, if greater than 1 try to enable MSAA at that level, ignores invalid values.

Tests for C++ settings, Android Settings, Android GL Context.

/// Setting this value to 0 or 1 disables MSAA.
/// If it is not 0 or 1, it must be one of 2, 4, 8, or 16. However, if the
/// GPU does not support the requested sampling value, MSAA will be disabled.
uint8_t msaa_samples = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is fine, assuming that we will eventually either remove it entirely or settle on a fixed sample count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Idea is to leave it disabled for now, yes.

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'd like to easily be able to swtich between 2x and 4x sampling for testing purposes on various devices

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.

LGTM

@dnfield
Copy link
Contributor Author

dnfield commented Mar 21, 2022

@blasten @jason-simmons @zanderso fyi. This change is intended to have no effect unless opted into. There is no intent to expose this flag via the tool just yet. It should make it easier to experiment with different AA strategies though.

@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 Mar 21, 2022
@fluttergithubbot fluttergithubbot merged commit 7b38d45 into flutter:main Mar 21, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 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-android platform-windows 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