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

Conversation

@johnmccutchan
Copy link
Contributor

  • Implement Impeller/GLES code paths.
  • A couple of fixes for EXTERNAL_OES textures via bdero@

@johnmccutchan johnmccutchan requested a review from bdero August 11, 2023 00:39
@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 (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.

Copy link
Member

@bdero bdero left a 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
#include "common/graphics/texture.h"
#include "flutter/common/graphics/texture.h"

Copy link
Contributor Author

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;
Copy link
Member

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

Suggested change
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;

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@bdero
Copy link
Member

bdero commented Aug 11, 2023

…peller/GLES

- Implement Impeller/GLES code paths.
- A couple of fixes for EXTERNAL_OES textures via bdero@
@johnmccutchan johnmccutchan merged commit 4e532b9 into flutter:main Aug 11, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 11, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 11, 2023
…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
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
…peller/GLES (flutter#44617)

- Implement Impeller/GLES code paths.
- A couple of fixes for EXTERNAL_OES textures via bdero@
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants