Repository navigation
Description
Use case
I want to use Flutter as the UI layer in a desktop application that relies heavily on graphics, similar to Adobe Illustrator.
Displaying my documents is planned to happen using Vulkan and Metal in order to allow more flexibility with GPU-based effects (think Photoshop filters). The code for this is native (written in Rust using wgpu). [Ideally, I'd like to use DX12 on Windows, but that's not an option with Flutter at all at the moment.]
In order to achieve this, I want to use the embedder API in Vulkan mode. I've written a proof-of-concept here, which already works.
However, in order to display the document view, I have to use Flutter's platform view API and integrate with that. This would work fine in theory, however this means that I have to render the view synchronously within the present_layers_callback callback. This is not really an option for me, because I want to use the rendering engine bevy (built on top of wgpu) that has its own render loop. Vulkan can support this use case as long as I'm rendering to different surfaces, but within present_layers_callback this is not the case. So, I'd have to either render the platform view to a texture or copy all of Flutter's layers into my own textures, so the renderer can composite them at its own pace.
I think that using Flutter as a UI layer for 3D content would also be interesting for games and other media applications (like Google Earth or a CAD tool for example). There are a few solutions for this (like Neosis GUI and Coherent Gameface), but nothing that comes close to Flutter's feature set and performance combination.
Proposal
For OpenGL and Metal, the Flutter embedder supports external textures. However, this is not implemented for Vulkan. With this support, I could skip a lot of the overhead described above, making the code much simpler and also faster (because Flutter could directly render the texture using the Texture widget and wouldn't have to flatten its own rendering into multiple textures).
Activity
eladmaimoni commentedon Jan 15, 2023
anlumo commentedon Jan 16, 2023
eladmaimoni commentedon Jan 16, 2023
MindStudioOfficial commentedon Mar 19, 2024
Hi, I am also facing a similar problem with my application.
My goal is to render something using Vulkan and display it as part of my Flutter UI using a Texture Widget.
Seeing this issue gave me hope that there might be a way to do that.
@anlumo while I don't see any progress here, were you able to achieve your goal with some workaround?
jwinarske commentedon Mar 19, 2024
@anlumo I'm starting the implementation on this in a week or so:
#144613
anlumo commentedon Mar 20, 2024
While I haven't started with the project where I'm going to need this yet, but my planned workaround is to use PlatformViews instead, as mentioned in the description.
1 remaining item
jwinarske commentedon Mar 20, 2024
@MindStudioOfficial
Anything that uses the Vulkan embedder API would be able to use it. Platform agnostic.
nrbnlulu commentedon Dec 11, 2025
isn't it supported by the android embedder for impeller?
flutter/engine/src/flutter/shell/platform/android/image_external_texture_vk_impeller.h
Line 19 in 882c29a
anlumo commentedon Dec 11, 2025
This ticket is about the C-based Embedder API.
loic-sharma commentedon Apr 21, 2026
Samsung's Flutter Tizen has forked the engine and added support for Vulkan external textures through the embedder API. This might be useful prior art:
xiaowei-guan commentedon Apr 22, 2026
Yes, flutter-tizen has supported render external texture for vulkan. I can create a PR for this part.
[-]External Texture Support for Vulkan[/-][+][Embedder API] Support external textures for Vulkan[/+][Embedder] Support render texture for vulkan (flutter#188855)
andywolff commentedon Oct 7, 2026
#188855 has merged. Please open a new issue if there's something not covered by that PR
github-actions commentedon Oct 21, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.