Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Support gpu buffer texture #26562

Closed
wants to merge 1 commit into from

Conversation

xiaowei-guan
Copy link

@xiaowei-guan xiaowei-guan commented Jun 3, 2021

This adds for supporting gpu buffer texture. Common API(shell/platform/common) only support pixel buffer texture, it need support gpu buffer texture to improve performance.

The related issue : flutter/flutter/issues/83693

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.
  • The reviewer has submitted any presubmit flakes in this PR using the engine presubmit flakes form before re-triggering the failure.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla
Copy link

google-cla bot commented Jun 3, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jun 3, 2021
@xiaowei-guan
Copy link
Author

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.
@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Jun 4, 2021
@chinmaygarde
Copy link
Member

cc @cbracken

@jnschulze
Copy link
Member

@xiaowei-guan
I‘d like to see an implementation for a specific platform/shell.
Just adding an interface that‘s not used in any of the first party ones won‘t help anyone.

@xiaowei-guan
Copy link
Author

@xiaowei-guan
I‘d like to see an implementation for a specific platform/shell.
Just adding an interface that‘s not used in any of the first party ones won‘t help anyone.

This an implementation for Samsung Tizen platfrom :
flutter-tizen#86

@jnschulze
Copy link
Member

@xiaowei-guan
I‘d like to see an implementation for a specific platform/shell.
Just adding an interface that‘s not used in any of the first party ones won‘t help anyone.

This an implementation for Samsung Tizen platfrom :
flutter-tizen#86

I got that. But it isn't used by any of the first party platforms. So what's the point of upstreaming this interface then? 🤦‍♂️

@swift-kim
Copy link
Contributor

@jnschulze Although this new interface might not be used by the first-party platforms at the moment, it would greatly help custom embedder authors implement external textures on their platforms in a clean manner using standard desktop library headers.

@cbracken Do you have any thoughts on this kind of matter? Can an interface (tentatively) only for custom embedders can be merged into the main stream by any chance?

@lattice0
Copy link

Hi, I just wanted to say that I'm writing a NVR (Network Video Recorder) in flutter and thus I need to not only render lots of video in flutter textures (thus use GPU rendering), but also pass the videos from the cameras in YUV form, each to its own texture, and then render them into the flutter texture. That is, do the YUV->RGB conversion in shader.

Will this be possible with this PR? I'm not an OpenGL expert so I don't know if mixing Y,U,V textures into another one would work with this flutter texture here. I only mixed them together into the screen's buffer, or something like that.

@xiaowei-guan
Copy link
Author

Will this be possible with this PR? I'm not an OpenGL expert so I don't know if mixing Y,U,V textures into another one would work with this flutter texture here. I only mixed them together into the screen's buffer, or something like that.

This pach only provides interface which privide a way to pass gpu buffer pointer, But the specific implementation needs to be completed by the platform itself.

@CaseyHillers CaseyHillers changed the base branch from master to main November 15, 2021 18:16
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@gspencergoog
Copy link
Contributor

Pinging @cbracken (Desktop Triage)

@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

@ZhenFTW
Copy link

ZhenFTW commented Feb 23, 2022

Any update on this?

@jnschulze
Copy link
Member

I‘m going to close this given that #26840 provides a similar interface (which is effectively a superset of your proposal).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants