-
Notifications
You must be signed in to change notification settings - Fork 6k
Add support for HardwareBuffer backed Android Platform Views under Impeller/GLES #44617
Conversation
johnmccutchan
commented
Aug 11, 2023
- Implement Impeller/GLES code paths.
- A couple of fixes for EXTERNAL_OES textures via bdero@
|
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. |
bdero
left a comment
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! Just some nits.
|
|
||
| #include <android/hardware_buffer_jni.h> | ||
| #include <android/sensor.h> | ||
| #include "common/graphics/texture.h" |
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.
nit
| #include "common/graphics/texture.h" | |
| #include "flutter/common/graphics/texture.h" |
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.
Done.
| void main() { | ||
| vec4 sampled = | ||
| texture(SAMPLER_EXTERNAL_OES_texture_sampler, v_texture_coords); | ||
| vec2 tc = v_texture_coords; |
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.
Nit: Add todo.
Filed an issue for follow-up investigation: flutter/flutter#132360
| vec2 tc = v_texture_coords; | |
| // TODO(132360): For some reason, the vertex shader Y invert isn't working | |
| // even when setting the wrapped texture intent to | |
| // `TextureIntent::kRenderToTexture` for external GL textures. | |
| // In the meantime, performing the sampling invert here is safe | |
| // because the Android embedder only tries to composite external | |
| // textures that have been written to as a render target. | |
| vec2 tc = v_texture_coords; |
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 is no longer necessary after setting the texture intent to be kUploadFromHost.
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.
Also note that the vertex shader is no longer modified.
|
You'll also need to apply the malioc diff (visible here): https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8773102538526899121/+/u/test:_malioc_diff/stdout |
…peller/GLES - Implement Impeller/GLES code paths. - A couple of fixes for EXTERNAL_OES textures via bdero@
…s under Impeller/GLES (flutter/engine#44617)
…132376) flutter/engine@25afdb9...4e532b9 2023-08-11 [email protected] Add support for HardwareBuffer backed Android Platform Views under Impeller/GLES (flutter/engine#44617) 2023-08-11 [email protected] Roll Fuchsia Linux SDK from konJQZKk2qXc276iA... to v33NyNdr6Y1sKZDze... (flutter/engine#44627) 2023-08-11 [email protected] Roll Skia from 41d099099095 to 723df2275d7b (1 revision) (flutter/engine#44626) 2023-08-11 [email protected] Roll Skia from f4080803ee69 to 41d099099095 (2 revisions) (flutter/engine#44624) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from konJQZKk2qXc to v33NyNdr6Y1s 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 [email protected],[email protected],[email protected] 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…peller/GLES (flutter#44617) - Implement Impeller/GLES code paths. - A couple of fixes for EXTERNAL_OES textures via bdero@