flutter/dev/integration_tests/external_textures
Christopher Fujino 730d6d44b7
Don't pin package:macros (#148087)
Full context https://github.com/flutter/flutter/issues/148004

TL;DR

1. Because `package:macros` depends on `package:_macros` via [a Dart SDK
dependency](https://github.com/dart-lang/sdk/blob/main/pkg/macros/pubspec.yaml#L13);
and
2. `package:macros` exactly pins `package:_macros`; and
3. Each new version of `package:macros` will increment its exact pin of
`package:_macros`
([comment](https://github.com/flutter/flutter/issues/148004#issuecomment-2103099893));
and
4. The [flutter/flutter](https://github.com/flutter/flutter) repository
exactly pins the Dart SDK (via its exact pin on the
[flutter/engine](https://github.com/flutter/engine) repository

Therefore, the [flutter/flutter](https://github.com/flutter/flutter)
repository effectively pins both `package:macros` and `package:_macros`
already (as in, there exists only a single version of each that pub will
successfully be able to solve within the context of a particular Flutter
SDK).

Therefore, it is safe for
[flutter/flutter](https://github.com/flutter/flutter) repository to
*not* pin `package:macros`, which will allow engine -> framework rolls
that contain a new Dart SDK that contains a new `package:_macros`
version to land automatically, provided all tests pass.
2024-05-09 16:28:49 -07:00
..
android [flutter_tools] Update external link in Android manifest template (#144302) 2024-02-29 06:47:19 +00:00
ios Start renaming by adding a new bringup: true as an Android emulator. (#142257) 2024-01-26 01:07:08 +00:00
lib Reverts "Reverts "Rename integration_tests/external_ui but do not touch anything else..."" (#142268) 2024-01-25 22:28:27 +00:00
test_driver Reverts "Reverts "Rename integration_tests/external_ui but do not touch anything else..."" (#142268) 2024-01-25 22:28:27 +00:00
pubspec.yaml Don't pin package:macros (#148087) 2024-05-09 16:28:49 -07: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. ↩︎