-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Retry "Implements the Android native stretch effect as a fragment shader (Impeller-only)." #173885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…t.dart Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
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.
Code Review
This pull request appears to implement the Android native stretch effect using a fragment shader for Impeller, despite the "Revert" in the title. I have reviewed it as an implementation. The changes introduce a new StretchEffect
widget that uses a GLSL shader to create a more visually appealing overscroll effect, with a fallback to a Transform
-based effect on platforms where shaders are not supported. The implementation looks solid, but I have identified a potential null-pointer exception, a bug in the shader loading logic, and an opportunity to improve code maintainability by replacing magic numbers with named constants. Addressing these points will improve the robustness and clarity of the new feature.
The stretch_effect.frag shader is required for the runtime_stage Impeller tests. I don't have the ability to format the shader file locally. Could someone please add this shader to flutter/impeller/fixtures? |
I’ve formatted the shader file and added it to the engine. |
We're working on a fix on the Google test side. It seems like you won't need to add the shader to the Impeller fixtures (be889ea). |
The fix on our side has landed, now running the Google tests. |
@justinmc Should we revert the recent changes? Is this just a Google test issue rather than a configuration problem? |
@MTtankkeo Yes, can you revert be889ea? Then assuming it still passes the Google tests I think we'll be good to reland. |
This PR retries the previously reverted PR #169293.
Note
This feature was originally intended to be Impeller-only, and it was agreed that no additional engine changes were necessary. However, during testing on the Metal backend, a shader loading issue occurred. In my view, this seems to be a simple problem caused by the shader not being included in the engine’s runtime_stages.
Pre-launch Checklist
///
).