-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to reproduce
- Obtain a Samsung Galaxy S10 (SM-G973N) running Android 12 (Build Number: SP1A.210812.016).
- Run an application that processes real-time video streams (e.g., from a camera). On Android, a dedicated native component performs hardware-accelerated OpenGL ES rendering of these video frames directly onto a
Surfacethat is dynamically created and managed by Flutter'sTextureRegistry.SurfaceProducer. ThisSurfaceserves as the underlying buffer for a FlutterTexture. Finally, the Flutter UI, specifically a widget that owns theTexturewidget, displays this live video stream by referencing theTexture's unique ID. - Ensure Impeller is enabled and run the application.
Expected results
The live video stream should be displayed on the screen using the Texture widget without any visual artifacts or issues.
Actual results
Nothing is displayed on the screen when Impeller is enabled. When Impeller is disabled, the video stream displays correctly without any problems.
Code sample
Providing a minimal reproducible example is challenging due to the intricate nature of the native video pipeline and its integration. It has been observed that a very simple Flutter app (which merely creates a TextureRegistry.SurfaceProducer, feeds a basic camera stream to its associated Surface, and displays it using a Texture widget) works correctly with Impeller enabled.
Screenshots or Video
N/A
Logs
Despite trying to capture adb logcat output during the issue, no relevant Flutter-engine logs, warnings, or errors are immediately apparent.
Flutter Doctor output
Doctor output
$ flutter doctor -v
[!] Flutter (Channel [user-branch], 3.32.0, on macOS 15.5 24F74 darwin-arm64, locale en-KR) [973ms]
! Flutter version 3.32.0 on channel [user-branch] at /Users/leebc/Library/flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision be698c48a6 (4 weeks ago), 2025-05-19 12:59:14 -0700
• Engine revision 1881800949
• Dart version 3.8.0
• DevTools version 2.45.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git"
directly to perform update checks and upgrades.Additional Context
I previously encountered similar rendering problems on this device, as documented in:
- Issue #160409:
[3.27.0][Android][Impeller] Crash on fml_check at surface_texture_external_texture.cc:55
A bisect of the Flutter repository has pinpointed the commit that introduces this rendering breakage:
- 04cc4b1 -
[Impeller] Reland: move AHB check into Flutter main, don't disable ImageReader on 29.([Impeller] Reland: move AHB check into Flutter main, don't disable ImageReader on 29. #164201)
I believe this specific commit is highly relevant as it directly modifies how Impeller interacts with Android Hardware Buffers. Given that the previous issue was linked to Impeller's Vulkan backend, I hypothesize this regression is related to Impeller's handling or consumption of native graphics buffers on this particular device's GPU/driver combination.
I am ready to provide further diagnostic information. If you can suggest specific ways to dump logs or adjust Impeller parameters, i will gladly provide the necessary data to assist in the investigation.