Repository navigation
[CP-stable][Linux] Fix layer position when compositing without glBlitFramebuffer - #196418
Conversation
|
@robert-ancell please fill out the PR description above, afterwards the release team will review this request. |
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
There was a problem hiding this comment.
Code Review
This pull request updates the Linux OpenGL compositor to calculate scale factors as doubles and uses them to adjust the shader offset and scale. A review comment suggests adding a validation check to prevent division by zero when the width or height is zero or negative.
|
autosubmit label was removed for flutter/flutter/196418, because - The status or check suite Presubmit has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
Android test flaked, rerunning... |
4d35714
into
flutter:flutter-3.50-candidate.0
Adds `CHANGELOG.md` entries for the 3.50.1 stable hotfix (#196756, #196721, #196127, #196035, #196418, #196800, #196796, #196895, #196383, #196923). Omits the infra-only #196760 and the `engine.version` sync #196932. Tracker: #196743 ### Edits to cherry-pick changelog descriptions - All entries use the cherry-pick PR's "Changelog Description" verbatim, except for backticks around code terms (#196756, #196418, #196895, #196923) and a comma and trailing period in the #196418 entry. - #196923 also cherry-picks #195006, so it has two entries, as listed in its "Changelog Description". If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
Flutter 3.50.0's Linux engine composites the first layer with a shader when glBlitFramebuffer is unavailable or the GL vendor is NVIDIA, Vivante or ARM, and that path placed the layer's centre at the window's bottom-left corner: only the top-right quarter of the app showed, in the bottom-left quarter of the window (flutter/flutter#195885). 3.47.9 always blitted the first layer, so v0.9.3 was not affected. 3.50.1 carries the fix (flutter/flutter#196418); Dart stays at 3.14.0. The pubspec floor moves with the pin so a local build cannot ship 3.50.0.
Flutter 3.50.0 stopped using glBlitFramebuffer on NVIDIA drivers and composites the frame with a shader instead, whose offset put it half a window down and to the left: on an NVIDIA card a Linux build shows only the application's top-right quarter. No release has shipped 3.50.0 yet; 3.50.1 fixes the offset (flutter/flutter#196418) before one does.
Flutter 3.50.0 stopped using glBlitFramebuffer on NVIDIA drivers and composites the frame with a shader instead, whose offset put it half a window down and to the left: on an NVIDIA card a Linux build shows only the application's top-right quarter. No release has shipped 3.50.0 yet; 3.50.1 fixes the offset (flutter/flutter#196418) before one does.
Flutter 3.50.0 stopped using glBlitFramebuffer on NVIDIA drivers and composites the frame with a shader instead, whose offset put it half a window down and to the left. On an NVIDIA card the window showed only the application's top-right quarter, in its bottom-left quarter, under Wayland and X11 alike. Flutter 3.50.1 fixes the offset (flutter/flutter#196418). Also corrects the runner comment that blamed Hyprland's launch for the stale subsurface scale: that one needs a scale change.
Flutter 3.50.0 stopped using glBlitFramebuffer on NVIDIA drivers and composites the frame with a shader instead, whose offset put it half a window down and to the left. On an NVIDIA card the Linux window has shown only the application's top-right quarter, in its bottom-left quarter, since 1.0.1, under Wayland and X11 alike. Flutter 3.50.1 fixes the offset (flutter/flutter#196418).
Flutter 3.50.0 stopped using glBlitFramebuffer on NVIDIA drivers and composites the frame with a shader instead, whose offset put it half a window down and to the left. On an NVIDIA card the Linux window has shown only the application's top-right quarter, in its bottom-left quarter, since 0.1.2, under Wayland and X11 alike. Flutter 3.50.1 fixes the offset (flutter/flutter#196418).
Cherry-pick of #196083.
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
What is the link to the issue this cherry-pick is addressing?
#195885
Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.
On Linux systems where glBlitFramebuffer is not available an application will be rendered off center.
Changelog Description:
Explain this cherry pick:
See best practices for examples.
[flutter/195885] When running Linux apps on drivers without glBlitFramebuffer app content is shifted
Workaround:
Is there a workaround for this issue?
No workaround.
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
No able to test as is visual output, not tested on master. Manually tested.
Validation Steps:
What are the steps to validate that this fix works?
Run default Flutter app on device that doesn't support glBlitFramebuffer. Confirm it is rendered correctly (not offset).