Pierre f234d26926
Clean up links to docs website (#177792)
- remove link without use (PowerShell version minimum not reached, this
is not mentionned anywhere in Windows installation / troubleshooting
documentation)
- clean up API docs root
- clean up app template links, add `Learn Flutter` link
- update get started links
- replace `flutter.dev/docs` with `docs.flutter.dev`
- fix embedder descriptions
- fix broken API `docs.flutter.io` links
- http → https 
- remove `/install` from `/get-started` links
- fix Android Studio link

## 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

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
2025-11-01 18:38:27 +00:00

48 lines
2.0 KiB
Markdown

# external_textures
Tests external texture rendering between a native[^1] platform and Flutter.
Part of Flutter's API for [plugins](https://docs.flutter.dev/development/packages-and-plugins/developing-packages#plugin) includes passing _external textures_, or textures
created outside of Flutter, to Flutter, typically using the [`Texture`][texture]
widget. This is useful for plugins that render video, or for plugins that
interact with the camera.
For example:
- [`packages/camera`][camera]
- [`packages/video_player`][video_player]
[texture]: https://api.flutter.dev/flutter/widgets/Texture-class.html
[camera]: https://github.com/flutter/packages/tree/8255fbed74465425a1ec06a1804225e705e29f52/packages/camera
[video_player]: https://github.com/flutter/packages/tree/8255fbed74465425a1ec06a1804225e705e29f52/packages/video_player
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 drive`[^2]:
```sh
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](../../devicelab/README.md).
>
> See [`devicelab/lib/tasks/integration_tests.dart`](../../devicelab/lib/tasks/integration_tests.dart)
> and search for `createExternalUiFrameRateIntegrationTest`.
>
> The actual tests are run by task runners:
>
> - [Android](../../devicelab/bin/tasks/external_textures_integration_test.dart)
> - [iOS](../../devicelab/bin/tasks/external_textures_integration_test_ios.dart)
[^1]: Only iOS and Android.
[^2]: Unfortunately documentation is quite limited. See [#142021](https://github.com/flutter/flutter/issues/142021).