-
Notifications
You must be signed in to change notification settings - Fork 6k
Add createImageFromTextureSource method to ui_web #53483
Add createImageFromTextureSource method to ui_web #53483
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
fd6d3b9
to
c305f03
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
@jezell – look at a rebase and failing tests? |
@jezell Are the impeller changes related? |
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.
This looks like it has pulled in a bunch of unrelated changes. Can you clean this PR up so that only contains the changes related to the proposed createImageFromTextureSource
API?
c305f03
to
ff4b00f
Compare
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
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.
Looks good to me, modulo a few random formatting things, and one requested change to the API surface. Thanks for the fix! I think this will be a good addition.
Co-authored-by: Jackson Gardner <[email protected]>
Co-authored-by: Jackson Gardner <[email protected]>
Golden file changes are available for triage from new commit, Click here to view. |
Golden file changes are available for triage from new commit, Click here to view. |
I approved the new goldens. |
Okay to |
auto label is removed for flutter/engine/53483, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
Thanks @kevmoo @eyebrowsoffire |
Adds createImageFromTextureSource for flutter web, exposed in dart:web_ui.
In canvaskit renderer, this will use MakeLazyImageFromTextureSource. In SkWasmRenderer, it will call imageCreateFromTextureSource, which was already implemented in SkWasm for createImageFromImageBitmap to use, but was not exposed in a way that it could be taken advantage of.
By default, createImageFromTextureSource will create a copy of the object it is passed, but transferOwnership: true may be specified to allow transferable objects to be transferred to the renderer, avoiding the copy.
Fixes: flutter/flutter#150479
Fixes: flutter/flutter#144815