Skip to content

Use Async SurfaceHolder Callback to remove need for setting alpha workaround - #171398

Merged
auto-submit[bot] merged 19 commits into
flutter:masterfrom
mboetger:use-surfaceholder-callback2-140246
Jul 10, 2025
Merged

auto-submit[bot] merged 19 commits into
flutter:masterfrom
mboetger:use-surfaceholder-callback2-140246

Conversation

@mboetger

@mboetger mboetger commented Jun 30, 2025 •

Copy link
Copy Markdown
Contributor

We can rely on the SurfaceHolder.Callback2 method, surfaceRedrawNeededAsync to properly signal the below Surface that rendering of the frame is done, and the Surface can be finished drawing. This removes the need to set the alpha to prevent the blank surface from being rendered before the engine is done.

Fixes: #140246

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], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@mboetger
mboetger requested a review from a team as a code owner June 30, 2025 18:55
@github-actions github-actions Bot added platform-android Android applications specifically engine flutter/engine related. See also e: labels. team-android Owned by Android platform team labels Jun 30, 2025
@mboetger
mboetger force-pushed the use-surfaceholder-callback2-140246 branch from 61e7d7b to 1a10c36 Compare June 30, 2025 18:57

@gmackall gmackall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mostly lgtm, have some naming/structure questions

@mboetger
mboetger requested review from gmackall and reidbaker July 2, 2025 21:48

@gmackall gmackall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mboetger
mboetger requested a review from reidbaker July 8, 2025 17:04
@mboetger
mboetger dismissed reidbaker’s stale review July 8, 2025 21:30

Spoke triage meeting

@mboetger mboetger added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 9, 2025
@auto-submit
auto-submit Bot added this pull request to the merge queue Jul 9, 2025
Merged via the queue into flutter:master with commit 189a5db Jul 10, 2025
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 10, 2025
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jul 10, 2025
flutter/flutter@ac12f66...43657f3

2025-07-10 [email protected] [web] Add frame number support. (flutter/flutter#171592)
2025-07-10 [email protected] Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter/flutter#171073)
2025-07-10 [email protected] Roll Fuchsia Linux SDK from 0-xqmXWc4cXzw3tfe... to lO64ePNEGrGzs-MFC... (flutter/flutter#171937)
2025-07-10 [email protected] Refactor compositor classes (flutter/flutter#171414)
2025-07-10 [email protected] Give an actionable error to `flutter_test.*tap` of a `RenderSliver` (flutter/flutter#171930)
2025-07-10 [email protected] Fix the issue with `SliverMainAxisGroups` growing in the reverse direction during layout. (flutter/flutter#171005)
2025-07-09 [email protected] Adds a MCP server for working with the engine (flutter/flutter#171738)
2025-07-09 [email protected] Use Async SurfaceHolder Callback to remove need for setting alpha workaround (flutter/flutter#171398)
2025-07-09 [email protected] Update `CHANGELOG` for 3.32.5, 3.32.6 stable hotfix releases (flutter/flutter#171891)
2025-07-09 [email protected] Add `flutter config --enable-omit-legacy-version-file` (flutter/flutter#171903)
2025-07-09 [email protected] Allow flutter attach to discover flutter engine running on Custom Device (flutter/flutter#170635)
2025-07-09 [email protected] Hide the rarely direct used `--sample` argument by default (flutter/flutter#171898)
2025-07-09 [email protected] Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter/flutter#171892)
2025-07-09 [email protected] [Android 16] Added Docs to Warn Users that SystemChrome.setPreferredOrientations will Not Work (flutter/flutter#171089)
2025-07-09 [email protected] Add analytics events for wasm dry runs on web builds (flutter/flutter#171818)
2025-07-09 [email protected] feat: new builders for size experiment (flutter/flutter#171886)
2025-07-09 [email protected] Update `.gitignore`s (flutter/flutter#171907)
2025-07-09 [email protected] Add total execution time to the flutter upgrade command (flutter/flutter#171475)
2025-07-09 [email protected] Simplify the template for infrastructure requests (flutter/flutter#171905)
2025-07-09 [email protected] Add detailed error message for BorderRadiusDirectional (flutter/flutter#171805)
2025-07-09 [email protected] Add public postmortem of the 3.32.3 release. (flutter/flutter#171904)
2025-07-09 [email protected] Make `labels` field an array (flutter/flutter#171906)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Roll Packages from cba2e90 to 4a231ae (5 revisions) (#171879)" (#171897)" (flutter/flutter#171910)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Packages from cba2e90 to 4a231ae (5 revisions) (#171879)" (flutter/flutter#171897)
2025-07-09 [email protected] [skia] Fix flag fiddling for Fuchsia, FreeType, & friends (flutter/flutter#171874)

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
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 10, 2025
…karound (flutter#171398)

We can rely on the SurfaceHolder.Callback2 method,
surfaceRedrawNeededAsync to properly signal the below Surface that
rendering of the frame is done, and the Surface can be finished drawing.
This removes the need to set the alpha to prevent the blank surface from
being rendered before the engine is done.

Fixes: flutter#140246

## 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].
- [X] 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.
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 28, 2025
…karound (flutter#171398)

We can rely on the SurfaceHolder.Callback2 method,
surfaceRedrawNeededAsync to properly signal the below Surface that
rendering of the frame is done, and the Surface can be finished drawing.
This removes the need to set the alpha to prevent the blank surface from
being rendered before the engine is done.

Fixes: flutter#140246

## 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].
- [X] 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.
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
flutter/flutter@ac12f66...43657f3

2025-07-10 [email protected] [web] Add frame number support. (flutter/flutter#171592)
2025-07-10 [email protected] Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter/flutter#171073)
2025-07-10 [email protected] Roll Fuchsia Linux SDK from 0-xqmXWc4cXzw3tfe... to lO64ePNEGrGzs-MFC... (flutter/flutter#171937)
2025-07-10 [email protected] Refactor compositor classes (flutter/flutter#171414)
2025-07-10 [email protected] Give an actionable error to `flutter_test.*tap` of a `RenderSliver` (flutter/flutter#171930)
2025-07-10 [email protected] Fix the issue with `SliverMainAxisGroups` growing in the reverse direction during layout. (flutter/flutter#171005)
2025-07-09 [email protected] Adds a MCP server for working with the engine (flutter/flutter#171738)
2025-07-09 [email protected] Use Async SurfaceHolder Callback to remove need for setting alpha workaround (flutter/flutter#171398)
2025-07-09 [email protected] Update `CHANGELOG` for 3.32.5, 3.32.6 stable hotfix releases (flutter/flutter#171891)
2025-07-09 [email protected] Add `flutter config --enable-omit-legacy-version-file` (flutter/flutter#171903)
2025-07-09 [email protected] Allow flutter attach to discover flutter engine running on Custom Device (flutter/flutter#170635)
2025-07-09 [email protected] Hide the rarely direct used `--sample` argument by default (flutter/flutter#171898)
2025-07-09 [email protected] Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter/flutter#171892)
2025-07-09 [email protected] [Android 16] Added Docs to Warn Users that SystemChrome.setPreferredOrientations will Not Work (flutter/flutter#171089)
2025-07-09 [email protected] Add analytics events for wasm dry runs on web builds (flutter/flutter#171818)
2025-07-09 [email protected] feat: new builders for size experiment (flutter/flutter#171886)
2025-07-09 [email protected] Update `.gitignore`s (flutter/flutter#171907)
2025-07-09 [email protected] Add total execution time to the flutter upgrade command (flutter/flutter#171475)
2025-07-09 [email protected] Simplify the template for infrastructure requests (flutter/flutter#171905)
2025-07-09 [email protected] Add detailed error message for BorderRadiusDirectional (flutter/flutter#171805)
2025-07-09 [email protected] Add public postmortem of the 3.32.3 release. (flutter/flutter#171904)
2025-07-09 [email protected] Make `labels` field an array (flutter/flutter#171906)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Roll Packages from cba2e90 to 4a231ae (5 revisions) (#171879)" (#171897)" (flutter/flutter#171910)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Packages from cba2e90 to 4a231ae (5 revisions) (#171879)" (flutter/flutter#171897)
2025-07-09 [email protected] [skia] Fix flag fiddling for Fuchsia, FreeType, & friends (flutter/flutter#171874)

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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…karound (flutter#171398)

We can rely on the SurfaceHolder.Callback2 method,
surfaceRedrawNeededAsync to properly signal the below Surface that
rendering of the frame is done, and the Surface can be finished drawing.
This removes the need to set the alpha to prevent the blank surface from
being rendered before the engine is done.

Fixes: flutter#140246

## 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].
- [X] 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.
mboetger added a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…karound (flutter#171398)

We can rely on the SurfaceHolder.Callback2 method,
surfaceRedrawNeededAsync to properly signal the below Surface that
rendering of the frame is done, and the Surface can be finished drawing.
This removes the need to set the alpha to prevent the blank surface from
being rendered before the engine is done.

Fixes: flutter#140246

## 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].
- [X] 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.
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…karound (flutter#171398)

We can rely on the SurfaceHolder.Callback2 method,
surfaceRedrawNeededAsync to properly signal the below Surface that
rendering of the frame is done, and the Surface can be finished drawing.
This removes the need to set the alpha to prevent the blank surface from
being rendered before the engine is done.

Fixes: flutter#140246

## 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].
- [X] 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.
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
flutter/flutter@ac12f66...43657f3

2025-07-10 [email protected] [web] Add frame number support. (flutter/flutter#171592)
2025-07-10 [email protected] Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter/flutter#171073)
2025-07-10 [email protected] Roll Fuchsia Linux SDK from 0-xqmXWc4cXzw3tfe... to lO64ePNEGrGzs-MFC... (flutter/flutter#171937)
2025-07-10 [email protected] Refactor compositor classes (flutter/flutter#171414)
2025-07-10 [email protected] Give an actionable error to `flutter_test.*tap` of a `RenderSliver` (flutter/flutter#171930)
2025-07-10 [email protected] Fix the issue with `SliverMainAxisGroups` growing in the reverse direction during layout. (flutter/flutter#171005)
2025-07-09 [email protected] Adds a MCP server for working with the engine (flutter/flutter#171738)
2025-07-09 [email protected] Use Async SurfaceHolder Callback to remove need for setting alpha workaround (flutter/flutter#171398)
2025-07-09 [email protected] Update `CHANGELOG` for 3.32.5, 3.32.6 stable hotfix releases (flutter/flutter#171891)
2025-07-09 [email protected] Add `flutter config --enable-omit-legacy-version-file` (flutter/flutter#171903)
2025-07-09 [email protected] Allow flutter attach to discover flutter engine running on Custom Device (flutter/flutter#170635)
2025-07-09 [email protected] Hide the rarely direct used `--sample` argument by default (flutter/flutter#171898)
2025-07-09 [email protected] Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter/flutter#171892)
2025-07-09 [email protected] [Android 16] Added Docs to Warn Users that SystemChrome.setPreferredOrientations will Not Work (flutter/flutter#171089)
2025-07-09 [email protected] Add analytics events for wasm dry runs on web builds (flutter/flutter#171818)
2025-07-09 [email protected] feat: new builders for size experiment (flutter/flutter#171886)
2025-07-09 [email protected] Update `.gitignore`s (flutter/flutter#171907)
2025-07-09 [email protected] Add total execution time to the flutter upgrade command (flutter/flutter#171475)
2025-07-09 [email protected] Simplify the template for infrastructure requests (flutter/flutter#171905)
2025-07-09 [email protected] Add detailed error message for BorderRadiusDirectional (flutter/flutter#171805)
2025-07-09 [email protected] Add public postmortem of the 3.32.3 release. (flutter/flutter#171904)
2025-07-09 [email protected] Make `labels` field an array (flutter/flutter#171906)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Roll Packages from cba2e90 to 4a231ae (5 revisions) (#171879)" (#171897)" (flutter/flutter#171910)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Packages from cba2e90 to 4a231ae (5 revisions) (#171879)" (flutter/flutter#171897)
2025-07-09 [email protected] [skia] Fix flag fiddling for Fuchsia, FreeType, & friends (flutter/flutter#171874)

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
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
flutter/flutter@ac12f66...43657f3

2025-07-10 [email protected] [web] Add frame number support. (flutter/flutter#171592)
2025-07-10 [email protected] Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter/flutter#171073)
2025-07-10 [email protected] Roll Fuchsia Linux SDK from 0-xqmXWc4cXzw3tfe... to lO64ePNEGrGzs-MFC... (flutter/flutter#171937)
2025-07-10 [email protected] Refactor compositor classes (flutter/flutter#171414)
2025-07-10 [email protected] Give an actionable error to `flutter_test.*tap` of a `RenderSliver` (flutter/flutter#171930)
2025-07-10 [email protected] Fix the issue with `SliverMainAxisGroups` growing in the reverse direction during layout. (flutter/flutter#171005)
2025-07-09 [email protected] Adds a MCP server for working with the engine (flutter/flutter#171738)
2025-07-09 [email protected] Use Async SurfaceHolder Callback to remove need for setting alpha workaround (flutter/flutter#171398)
2025-07-09 [email protected] Update `CHANGELOG` for 3.32.5, 3.32.6 stable hotfix releases (flutter/flutter#171891)
2025-07-09 [email protected] Add `flutter config --enable-omit-legacy-version-file` (flutter/flutter#171903)
2025-07-09 [email protected] Allow flutter attach to discover flutter engine running on Custom Device (flutter/flutter#170635)
2025-07-09 [email protected] Hide the rarely direct used `--sample` argument by default (flutter/flutter#171898)
2025-07-09 [email protected] Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter/flutter#171892)
2025-07-09 [email protected] [Android 16] Added Docs to Warn Users that SystemChrome.setPreferredOrientations will Not Work (flutter/flutter#171089)
2025-07-09 [email protected] Add analytics events for wasm dry runs on web builds (flutter/flutter#171818)
2025-07-09 [email protected] feat: new builders for size experiment (flutter/flutter#171886)
2025-07-09 [email protected] Update `.gitignore`s (flutter/flutter#171907)
2025-07-09 [email protected] Add total execution time to the flutter upgrade command (flutter/flutter#171475)
2025-07-09 [email protected] Simplify the template for infrastructure requests (flutter/flutter#171905)
2025-07-09 [email protected] Add detailed error message for BorderRadiusDirectional (flutter/flutter#171805)
2025-07-09 [email protected] Add public postmortem of the 3.32.3 release. (flutter/flutter#171904)
2025-07-09 [email protected] Make `labels` field an array (flutter/flutter#171906)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Roll Packages from 87e4917 to 5c14a6c (5 revisions) (#171879)" (#171897)" (flutter/flutter#171910)
2025-07-09 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Packages from 87e4917 to 5c14a6c (5 revisions) (#171879)" (flutter/flutter#171897)
2025-07-09 [email protected] [skia] Fix flag fiddling for Fuchsia, FreeType, & friends (flutter/flutter#171874)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-android Android applications specifically team-android Owned by Android platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use SurfaceHolder.Callback2

3 participants