Skip to content

Expand coverage of android_hardware_smoke_test. Add image, text, blend mode, and blur tests.#187600

Merged
andywolff merged 15 commits into
flutter:masterfrom
andywolff:apktest2
Jun 12, 2026
Merged

Expand coverage of android_hardware_smoke_test. Add image, text, blend mode, and blur tests.#187600
andywolff merged 15 commits into
flutter:masterfrom
andywolff:apktest2

Conversation

@andywolff

Copy link
Copy Markdown
Contributor

Expand test coverage to address more of #182123

Platform view tests will be next after this.

Pre-launch Checklist

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 5, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 5, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 5, 2026
@andywolff

Copy link
Copy Markdown
Contributor Author

/gemini review

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

Copy link
Copy Markdown
Contributor

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 expands the android_hardware_smoke_test integration test suite by introducing new test cases for text rendering, image texture sampling, advanced blending, and backdrop filter blurring. It refactors the test application to support these scenarios with new widgets and lazy image loading, and adds corresponding widget and driver tests. Feedback focuses on addressing potential runtime exceptions and memory leaks by checking if the widget is mounted before calling setState during image loading, avoiding force-unwrapping on potentially null images, and documenting or privatizing several undocumented public members to comply with the repository's style guide.

Comment thread dev/integration_tests/android_hardware_smoke_test/lib/main.dart
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/main.dart Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/main.dart
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/backdrop_filter_blur.dart Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/vector_drawings_canvas.dart Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/vector_drawings_canvas.dart Outdated
@Piinks Piinks added the engine flutter/engine related. See also e: labels. label Jun 8, 2026
andywolff added 8 commits June 9, 2026 13:42
- Add 'imageTest' rendering test case.
- Add a small 32x32 colored checkerboard test png.
- Add image loading behavior which executes only for the relevant test case, and handles load failure.
- Support dependency injection for ImageLoader to enable mocking in widget tests.
- Add 'captureScreenshot' channel parameter to skip fetching image bytes, which would cause a FakeAsync deadlock in widget tests.
- Dispose of native Codec and Image handles in main.dart and goldens.dart to prevent resource leaks which can cause widget tests to hang.
…t so far and any references which informed them
@github-actions github-actions Bot removed engine flutter/engine related. See also e: labels. CICD Run CI/CD labels Jun 9, 2026
@andywolff

Copy link
Copy Markdown
Contributor Author

/gemini review

@andywolff andywolff added the engine flutter/engine related. See also e: labels. label Jun 9, 2026

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

Copy link
Copy Markdown
Contributor

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 expands the Android hardware smoke test suite by adding new test cases for text rendering, image texture sampling, advanced blending, and backdrop filter blur. It refactors the rendering logic into separate widgets, updates the documentation, and adds corresponding widget and integration tests. Feedback focuses on improving robustness and resource management, including safer buffer conversion and resource cleanup during image loading, disposing of TextPainter to prevent leaks, replacing debug-only asserts with runtime null checks, and fixing a markdown formatting typo in the README.

Comment thread dev/integration_tests/android_hardware_smoke_test/lib/main.dart Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/README.md Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/vector_drawings_canvas.dart Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/vector_drawings_canvas.dart Outdated
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 10, 2026
@github-actions github-actions Bot removed the engine flutter/engine related. See also e: labels. label Jun 10, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 10, 2026
@andywolff

Copy link
Copy Markdown
Contributor Author

/gemini review

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

Copy link
Copy Markdown
Contributor

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 expands the Android hardware smoke test suite by adding new test cases for text rendering, image texture sampling, advanced blending, and backdrop filter blurring. It introduces the BackdropFilterBlur and VectorDrawingsCanvas widgets, updates the test driver and native JUnit tests, and adds corresponding widget tests. The review feedback highlights a performance concern in VectorDrawingsCanvas where a TextPainter is instantiated, laid out, and disposed inside the paint method of the custom painter.

Comment thread dev/integration_tests/android_hardware_smoke_test/lib/vector_drawings_canvas.dart Outdated
…ther vector drawing tests can remain stateless
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 10, 2026
@andywolff andywolff added the engine flutter/engine related. See also e: labels. label Jun 10, 2026
@andywolff andywolff requested a review from gaaclarke June 10, 2026 18:21
@andywolff

Copy link
Copy Markdown
Contributor Author

Looks like the linux analyzer presubmit failed because the repo disallows images. I'll do something else for the image test

Fixed in bf888ac

@andywolff andywolff added CICD Run CI/CD and removed CICD Run CI/CD labels Jun 10, 2026
@andywolff andywolff marked this pull request as ready for review June 10, 2026 20:32

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

Copy link
Copy Markdown
Contributor

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 expands the Android hardware smoke test suite by adding new visual regression test cases for font rendering, texture sampling, advanced blending, and compositing/blur. It introduces dedicated canvas widgets, updates the Kotlin test suite and test driver, and adds corresponding widget tests. The review feedback identifies opportunities to prevent native memory leaks by ensuring proper disposal of ui.Picture and ui.Image objects across image_drawing_canvas.dart, widget_test.dart, and goldens.dart.

Comment thread dev/integration_tests/android_hardware_smoke_test/lib/image_drawing_canvas.dart Outdated
Comment thread dev/integration_tests/android_hardware_smoke_test/lib/goldens.dart Outdated
@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems and removed engine flutter/engine related. See also e: labels. labels Jun 10, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 10, 2026
@andywolff

Copy link
Copy Markdown
Contributor Author

BTW this is what the goldens look like for the new tests

textTest
textTest vulkan

imageTest
imageTest vulkan

advancedBlendTest
advancedBlendTest vulkan

backdropFilterBlurTest
backdropFilterBlurTest vulkan

gaaclarke
gaaclarke previously approved these changes Jun 11, 2026

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

This is looking good. I added one question. I'm not sure if emoji will actually give us some coverage we don't have elsewhere that the gpu might get wrong.

Comment thread dev/integration_tests/android_hardware_smoke_test/README.md

@andywolff andywolff left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated textTest to add some emojis and fix the wrapping. New golden looks like this:

Image

@andywolff andywolff requested a review from gaaclarke June 11, 2026 21:30

@gaaclarke gaaclarke 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 🐦 😄

@andywolff andywolff added this pull request to the merge queue Jun 12, 2026
Merged via the queue into flutter:master with commit 1923455 Jun 12, 2026
18 checks passed
@andywolff andywolff deleted the apktest2 branch June 12, 2026 00:51
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 12, 2026
flutter/flutter@8bdce07...b7cb925

2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from cadbde1ec4b7 to 8c89bf2b0ee3 (5 revisions) (flutter/flutter#187926)
2026-06-12 engine-flutter-autoroll@skia.org Roll Packages from 1b56cde to b78ad83 (5 revisions) (flutter/flutter#187928)
2026-06-12 engine-flutter-autoroll@skia.org Roll Dart SDK from f3441f2067ae to f6c31f4c3a63 (17 revisions) (flutter/flutter#187924)
2026-06-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 2KosSR4ONUjIB7tP_... to A3eaUn9mQ_EkSNxVI... (flutter/flutter#187923)
2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from a2228b926c68 to cadbde1ec4b7 (9 revisions) (flutter/flutter#187921)
2026-06-12 kustermann@google.com Remove dynamic module loading code in flutter web engine (flutter/flutter#187777)
2026-06-12 matt.kosarek@canonical.com Remove EnableTransparentWindowBackground because it did nothing important and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE (flutter/flutter#187848)
2026-06-12 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from dQ4PjIJB5kZFU8Y32... to EmfiOMUge_nnNS33B... (flutter/flutter#187912)
2026-06-12 mvincentong@gmail.com Clarify RichText selection docs (flutter/flutter#186844)
2026-06-12 1063596+reidbaker@users.noreply.github.com Custom KGP task and migration to AGP api for geting kgp version (flutter/flutter#182788)
2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from f61acb31edf8 to a2228b926c68 (5 revisions) (flutter/flutter#187896)
2026-06-12 bdero@google.com [Flutter GPU] Expose ASTC HDR texture formats (flutter/flutter#187715)
2026-06-12 awolff@google.com Expand coverage of android_hardware_smoke_test. Add image, text, blend mode, and blur tests. (flutter/flutter#187600)
2026-06-11 bdero@google.com [Flutter GPU] Add blit operations (flutter/flutter#187289)
2026-06-11 bkonyi@google.com [flutter_tools] Fix version cache git fallback performance regression (flutter/flutter#187400)
2026-06-11 nshahan@google.com Rewrite `-d web-server` hot reload/restart tests (flutter/flutter#187453)
2026-06-11 bdero@google.com [Impeller] Allow sampling textures with manually-uploaded mip levels (flutter/flutter#187729)
2026-06-11 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187884)
2026-06-11 47866232+chunhtai@users.noreply.github.com iOS a11y sets header trait based on heading level (flutter/flutter#186916)
2026-06-11 engine-flutter-autoroll@skia.org Roll Skia from 9f02102df298 to f61acb31edf8 (19 revisions) (flutter/flutter#187869)
2026-06-11 engine-flutter-autoroll@skia.org Roll ICU from ee5f27adc28b to d578f2e8b7bd (8 revisions) (flutter/flutter#187829)

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 louisehsu@google.com,stuartmorgan@google.com 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
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…d mode, and blur tests. (flutter#187600)

Expand test coverage to address more of
flutter#182123

Platform view tests will be next after this.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[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

a: text input Entering text in a text field or keyboard related problems CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants