-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add windows plugin texture support #19405
Add windows plugin texture support #19405
Conversation
7e00d76
to
3d88880
Compare
3d88880
to
e16603c
Compare
fc7b5ff
to
d5b4626
Compare
Could you review this PR please? |
@jnschulze I tested on the flutter-webrtc plugin for windows and it works. You did cool things. |
@cloudwebrtc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good. Will need to rebase on top of #18878 which will be landing first.
#18878 has landed now. Please update to reflect that, thx. |
72797f6
to
cd70eed
Compare
@clarkezone I've just updated the PR. Please have a look. |
cd70eed
to
6e9de8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is there a demo / hello world example of how to work with external textures?
@stuartmorgan done, see #23623 |
Recipe change out for review: https://flutter-review.googlesource.com/c/recipes/+/9680 |
We are currently working on an FFI wrapper for the WebGPU API as a more flexible approach to OpenGL and till I stumbled upon this issue I wasn't aware that its currently not possbile to use a Widget with external Textturebuffer on Windows. |
|
Thanks for your demo,I still have another issue, I'm migrating flutter-webrtc for windows, it uses event_sink onFrame event. |
You're right. Unfortunately, the client wrapper doesn't expose a method like While it should be fairly simple to extend the client wrapper accordingly, we shouldn't discuss it here as it's a general Windows platform issue. |
So there isn't even an issue for MacOs? |
Only Linux is missing. macOS support was introduced by #8507 |
The handling of the new header has landed end-to-end, so this is good to land as soon as the tree re-opens 🎉 |
@stuartmorgan Thank you for your support, I really appreciate it, this issue was blocking using for making cool Windows desktop apps with Flutter. can't wait to see it land in the stable channel |
What would it require for this to gain some zero-copy interop with an OpenGL texture/FBO (and/or other APIs) ? Adapted the provided example to have a texture backed by an OpenGL renderer and calls to glReadPixels are prohibitively expensive for any real time rendering (around 10ms for a 1920x1080 texture, if not more on lower end systems). Pixel buffers aren't suited for such use. |
The first step would be a design doc with one or more concrete proposals for possible texture sources, including exploring what that API would look like, how it would work with Angle, and what the impact on that API of an eventual migration to a DirectX Skia backend would be. |
Description
This PR adds OpenGL texture support for plugins on the Windows platform.
Once this has landed flutter/flutter#61098 needs to be merged as well.
Related Issues
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.