Skip to content
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

Support for addTexture or some kind of dynamic/mutable texture support on web #139271

Open
eyebrowsoffire opened this issue Nov 29, 2023 · 1 comment
Labels
c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@eyebrowsoffire
Copy link
Contributor

As discussed in flutter/engine#37890

Now that we have the createImageFromImageBitmap API in dart:ui_web, users can create images from arbitrary browser image sources. However, creating a completely new image (and therefor WebGL texture) every time can be inefficient in some cases, and it would be preferable to be able to update the contents of an existing texture. We could expose this either through the addTexture API or through some other mechanism.

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team engine flutter/engine repository. See also e: labels. platform-web Web applications specifically c: proposal A detailed proposal for a change to Flutter team-web Owned by Web platform team and removed in triage Presently being triaged by the triage team labels Nov 30, 2023
@yjbanov yjbanov added P2 Important issues not at the top of the work list triaged-web Triaged by Web platform team labels Dec 7, 2023
@jezell
Copy link

jezell commented Mar 8, 2024

@eyebrowsoffire this seems to do the trick without needing a new API:

flutter/packages#6286

Though I think the API is a little off for createImageFromImageBitmap as it has bad type checks and also is missing a bunch of params that the browser API supports relating to sizing and cropping of the texture. Had to hack around it a little.

#144815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

No branches or pull requests

4 participants