Skip to content

[CP-stable][Linux] Fix layer position when compositing without glBlitFramebuffer - #196418

Merged
auto-submit[bot] merged 1 commit into
flutter:flutter-3.50-candidate.0from
flutteractionsbot:cp-stable-3f287915e06d8f802799c02c333da32e2b7d8dac
Nov 18, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:flutter-3.50-candidate.0from
flutteractionsbot:cp-stable-3f287915e06d8f802799c02c333da32e2b7d8dac

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • In one line that is accessible to most Flutter developers.
  • That describes the state prior to the fix.
  • That includes which platforms are impacted.
    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?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

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).

@flutteractionsbot
flutteractionsbot requested a review from a team as a code owner November 12, 2026 01:28
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Nov 12, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 12, 2026
@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@robert-ancell please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard

Copy link
Copy Markdown

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2026
@auto-submit

auto-submit Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

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.

@loic-sharma

Copy link
Copy Markdown
Member

Android test flaked, rerunning...

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2026
@auto-submit
auto-submit Bot merged commit 4d35714 into flutter:flutter-3.50-candidate.0 Nov 18, 2026
5 checks passed
@victorsanni victorsanni mentioned this pull request Nov 18, 2026
11 tasks done
auto-submit Bot pushed a commit that referenced this pull request Nov 19, 2026
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.
pickrui added a commit to pickrui/FlClash that referenced this pull request Nov 22, 2026
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.
artur-rios added a commit to artur-rios/heimdall-ui that referenced this pull request Nov 24, 2026
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.
artur-rios added a commit to artur-rios/fortuna-ui that referenced this pull request Nov 24, 2026
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.
artur-rios added a commit to artur-rios/orpheus that referenced this pull request Nov 24, 2026
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.
artur-rios added a commit to artur-rios/alexandria-ui that referenced this pull request Nov 24, 2026
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).
artur-rios added a commit to artur-rios/chimera that referenced this pull request Nov 24, 2026
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD cp: review Cherry-picks in the review queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants