Skip to content

Correct PerformanceOverlay optionsMask checks and add tests#182309

Merged
auto-submit[bot] merged 4 commits intoflutter:masterfrom
Piinks:rebase_abandoned_pr_174814
Feb 20, 2026
Merged

Correct PerformanceOverlay optionsMask checks and add tests#182309
auto-submit[bot] merged 4 commits intoflutter:masterfrom
Piinks:rebase_abandoned_pr_174814

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Feb 12, 2026

This re-stages the changes from #174814
That PR had some outstanding feedback to resolve, this is now done and we can get this change in, with thanks to @jihanurrahman33 !

From the original PR:

Fix bitmask checks in RenderPerformanceOverlay._intrinsicHeight:

Use bitwise AND (&) and compare against 0 instead of bitwise OR (|).
This ensures the intrinsic height is 0 when no options are enabled, 80.0 for one graph,
and 160.0 when both rasterizer and engine graphs are enabled.
Add tests in rendering/performance_overlay_test.dart to verify intrinsic height for
various masks.

Pre-launch Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@Piinks Piinks requested review from dkwingsmt and justinmc February 12, 2026 18:05
@Piinks Piinks added the framework flutter/packages/flutter repository. See also f: labels. label Feb 12, 2026
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍 . Thanks for reviving that PR!

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a bug in the bitmask checks within RenderPerformanceOverlay to accurately calculate its intrinsic height. The addition of tests is a great step towards ensuring correctness. My review includes suggestions to use const for compile-time constant bitmasks, which is a minor performance and style improvement, and to enhance the new tests with more comprehensive cases to ensure all combinations of options are handled correctly.

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 19, 2026

autosubmit label was removed for flutter/flutter/182309, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@Piinks Piinks force-pushed the rebase_abandoned_pr_174814 branch from beeb7c8 to 7fd23b9 Compare February 19, 2026 23:42
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 20, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 20, 2026
Merged via the queue into flutter:master with commit f38a3e0 Feb 20, 2026
74 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 23, 2026
flutter/flutter@91b2d41...dad6f9d

2026-02-23 [email protected] Roll Packages from 9da22bf to 12b43a1 (19 revisions) (flutter/flutter#182758)
2026-02-23 [email protected] Roll Skia from 55fae1660572 to 9a5a3c92c336 (7 revisions) (flutter/flutter#182749)
2026-02-23 [email protected] Roll Skia from 256e2b47b303 to 55fae1660572 (1 revision) (flutter/flutter#182741)
2026-02-22 [email protected] Roll Skia from 141ed451f007 to 256e2b47b303 (1 revision) (flutter/flutter#182732)
2026-02-22 [email protected] Roll Skia from e59de8a12e7e to 141ed451f007 (1 revision) (flutter/flutter#182729)
2026-02-22 [email protected] Roll Skia from f6ea7ef42d14 to e59de8a12e7e (1 revision) (flutter/flutter#182726)
2026-02-22 [email protected] Roll Skia from 34fa7b2373f3 to f6ea7ef42d14 (1 revision) (flutter/flutter#182721)
2026-02-21 [email protected] Roll Skia from 3ca547c8b816 to 34fa7b2373f3 (2 revisions) (flutter/flutter#182711)
2026-02-21 [email protected] Roll Skia from c91ad88e89f8 to 3ca547c8b816 (9 revisions) (flutter/flutter#182696)
2026-02-21 [email protected] Shortcircuit if Tooltip message and richMessage are empty (flutter/flutter#182524)
2026-02-21 [email protected] Add fields getter to FormState (flutter/flutter#180815)
2026-02-20 [email protected] fix(web_ui): use static whitelist for image codec tests (flutter/flutter#182648)
2026-02-20 [email protected] Add cupertino docimports for CupertinoPageTransitionsBuilder and fix typos (flutter/flutter#182685)
2026-02-20 [email protected] Fix Chat invite link (flutter/flutter#182675)
2026-02-20 [email protected] Roll Skia from ce5854495a3a to c91ad88e89f8 (58 revisions) (flutter/flutter#182678)
2026-02-20 [email protected] Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449 (flutter/flutter#182624)
2026-02-20 [email protected] Don't compile shaders to SkSL unless --sksl arg is present (flutter/flutter#182519)
2026-02-20 [email protected] Correct PerformanceOverlay optionsMask checks and add tests (flutter/flutter#182309)
2026-02-20 [email protected] [Impeller] libImpeller: Dispose thread local caches on each Vulkan frame (flutter/flutter#182402)
2026-02-20 [email protected] Update CHANGELOG for 3.41.2 stable hotfix (flutter/flutter#182647)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Feb 27, 2026
…182309)

This re-stages the changes from
flutter#174814
That PR had some outstanding feedback to resolve, this is now done and
we can get this change in, with thanks to @jihanurrahman33 !

From the original PR: 

> Fix bitmask checks in RenderPerformanceOverlay._intrinsicHeight:
> 
> Use bitwise AND (&) and compare against 0 instead of bitwise OR (|).
> This ensures the intrinsic height is 0 when no options are enabled,
80.0 for one graph,
> and 160.0 when both rasterizer and engine graphs are enabled.
> Add tests in rendering/performance_overlay_test.dart to verify
intrinsic height for
> various masks.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants