-
Notifications
You must be signed in to change notification settings - Fork 6k
Add EGL Surface backing store #43683
Add EGL Surface backing store #43683
Conversation
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 (don't just cc him here, he won't see it! He's on Discord!). 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. |
I think this direction is sound if you want to wrap up the remaining TODO items. |
Is this good for a review? This is still marked as WIP so not sure if you are still tinkering on it. |
@chinmaygarde The implementation is done and won't change anymore (unless we find any flaws). Just doesn't have any tests yet Btw, I noticed adding new fields to any of the specific, versioned backing store variants ( |
Are you planning on adding tests or is this good for review? Re. the ABI stuff, yeah we are getting away with it because we haven't anything to the end of the FlutterBackingStore struct (and can't). |
I'm currently on vacation, so next week 👍 |
Take your time! Just putting the WIP tag so triagers don't bother you. |
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. |
@ardera is this still work in progress? |
@cbracken yep it is reworking the testing infrastructure to account for multiple EGL surfaces was a bit more work than I thought originally, so just didn't get to it now |
Hey @ardera, are you still working on this? |
34b8315
to
19c3701
Compare
@jonahwilliams Sorry, here it is. The tests mostly assume there's only a single OpenGL surface, so I kinda had to fight against the test framework a bit lol. It's ready for review now. |
@ardera this appears to be failing tests due to what appears to be memory leak (possibly among other things). Once this gets to the state where all tests are passing, we can take another look. |
20122e9
to
eafe147
Compare
@cbracken This is ready for review now. |
Just to add another data-point, I'm currently working on migrating flutter-rs to the So thanks a lot for working on this @ardera and I'm looking forward to using it through the embedder API (once this pull-request lands). |
(triage): I spoke to @cbracken and he is going to take another look at this. |
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Chris Bracken <chris@bracken.jp>
3da2938
to
d315fdc
Compare
I added a |
…153124) flutter/engine@387f6f3...ef820aa 2024-08-08 jonahwilliams@google.com [Impeller] perform final blit and gpu end frame tracing earlier. (flutter/engine#54452) 2024-08-08 hanneswinkler2000@web.de Add EGL Surface backing store (flutter/engine#43683) 2024-08-08 jason-simmons@users.noreply.github.com Fix include of GrVkImageInfo header for the Fuchsia build (flutter/engine#54449) 2024-08-08 skia-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from AYS3tfC91ZRfdmIL0... to TXbf0oL9XzQ8vcHJP... (flutter/engine#54448) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#153124) flutter/engine@387f6f3...ef820aa 2024-08-08 jonahwilliams@google.com [Impeller] perform final blit and gpu end frame tracing earlier. (flutter/engine#54452) 2024-08-08 hanneswinkler2000@web.de Add EGL Surface backing store (flutter/engine#43683) 2024-08-08 jason-simmons@users.noreply.github.com Fix include of GrVkImageInfo header for the Fuchsia build (flutter/engine#54449) 2024-08-08 skia-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from AYS3tfC91ZRfdmIL0... to TXbf0oL9XzQ8vcHJP... (flutter/engine#54448) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#153124) flutter/engine@387f6f3...ef820aa 2024-08-08 jonahwilliams@google.com [Impeller] perform final blit and gpu end frame tracing earlier. (flutter/engine#54452) 2024-08-08 hanneswinkler2000@web.de Add EGL Surface backing store (flutter/engine#43683) 2024-08-08 jason-simmons@users.noreply.github.com Fix include of GrVkImageInfo header for the Fuchsia build (flutter/engine#54449) 2024-08-08 skia-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from AYS3tfC91ZRfdmIL0... to TXbf0oL9XzQ8vcHJP... (flutter/engine#54448) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Allows using an EGL surface as a flutter backing store. Way more convenient for GBM than hacking gbm bo's into GL FBOs.
This resolves flutter/flutter#58363
Currently, the embedder API assumes that the compositor (if it exists) will let flutter render into FBOs or Textures and then composite the whole thing onto the actual (EGL) window surface. I think this assumption is also documented a bit in flutter/flutter#38466
However, in my case, I want let the hardware do the composition (using the linux KMS API), and render each flutter layer into it's own EGL surface.
It's possible to hack around this by creating your own GBM BOs, importing those as EGL images, then importing those as GL Render Buffers and attaching those to GL FBOs and that works (tested it). However, that's basically reimplementing 50% of the whole GBM/EGL "window" system integration for no reason.
This PR adds:
FlutterOpenGLSurface
make_current
and destruction callback (plus userdata)eglMakeCurrent(..., surf, surf)
TODO:
Pre-launch Checklist
///
).