flutter/dev/integration_tests/external_textures
Kevin Moore c08e9dff68
Manually update vector_math package (#169476)
Includes fixes and deprecations that will allow us to improve
performance.
2025-05-28 15:55:01 +00:00
..
android Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (#166059) 2025-03-27 15:07:22 +00:00
ios Reverts "[Reland2] Implements UISceneDelegate dynamically w/ FlutterLaunchEngine (#169276)" (#169347) 2025-05-23 14:59:47 +00:00
lib Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
test_driver Fix Linux_android_emu tests late initialization errors (#152932) 2024-08-06 14:48:50 -07:00
pubspec.yaml Manually update vector_math package (#169476) 2025-05-28 15:55:01 +00:00
README.md Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00

external_textures

Tests external texture rendering between a native1 platform and Flutter.

Part of Flutter's API for plugins includes passing external textures, or textures created outside of Flutter, to Flutter, typically using the Texture widget. This is useful for plugins that render video, or for plugins that interact with the camera.

For example:

Because external textures are created outside of Flutter, there is often subtle translation that needs to happen between the native platform and Flutter, which is hard to observe. These integration tests are designed to help catch these subtle translation issues.

How it works

  • Each lib/*_main.dart file is a Flutter app instrumenting a test case.
  • There is a corresponding test_driver/*_test.dart that runs assertions.

To run the test cases locally, use flutter drive2:

flutter drive lib/frame_rate_main.dart --driver test_driver/frame_rate_test.dart

Tip

On CI, the test cases are run within our device lab.

See devicelab/lib/tasks/integration_tests.dart and search for createExternalUiFrameRateIntegrationTest.

The actual tests are run by task runners:


  1. Only iOS and Android. ↩︎

  2. Unfortunately documentation is quite limited. See #142021. ↩︎