Repository navigation
Description
Steps to reproduce
- Use Flutter 3.50.0-0.3.pre on Linux.
flutter create --platforms=linux repro && cd reproflutter run -d linuxon a system where the OpenGL compositor cannot blit (can_blit == false), for example:- NVIDIA proprietary driver (blocklisted for blit in [Linux] Make glBlitFramebuffer optional in the OpenGL compositor #189476). Reproduced on RTX 4060 Laptop, driver 595.99.02, Ubuntu 24.04, GNOME on X11.
- A GPU whose GLES context is < 3.0 without
GL_EXT_framebuffer_blit/GL_NV_framebuffer_blit. Reproduced on Intel HD Graphics (Ironlake, 8086:0042), Mesa 24.2.8 crocus, OpenGL ES 2.0, Rocky Linux 9.6, Xorg/XFCE.
- The result is the same with Impeller (default) and with Skia (
FLUTTER_ENGINE_SWITCHES=1 FLUTTER_ENGINE_SWITCH_1=enable-impeller=false).
Expected results
The app content fills the whole window at the correct position, as it does when the compositor uses glBlitFramebuffer.
Actual results
The content is translated by (-width/2, -height/2): the bottom-left quarter of the window shows the top-right quarter of the UI at 1:1 scale (in the counter app, the right part of the AppBar and the DEBUG banner), and the rest of the window is black. Hit testing is unaffected (clicks land on the correct
logical positions), so only compositing is wrong.
Root cause: in engine/src/flutter/shell/platform/linux/fl_compositor_opengl.cc, composite_layer():
fl_compositor_opengl_shader_set_offset(self->shader, (2 * x / width) - 1.0,
(2 * y / height) - 1.0); The quad in fl_compositor_opengl_shader.cc already spans the full NDC range (vertex_data = -1..1), and the vertex shader computes gl_Position = vec4(offset + position * scale, 0, 1). For a layer at (0, 0) the offset is therefore (-1, -1), and the quad is drawn at [-2, 0] x [-2, 0], which is exactly
the observed shift. For a layer at (0, 0) the offset should be (0, 0), i.e. 2 * x / width without - 1.0. The sign of the y term for non-zero layer offsets needs checking: layer offsets are top-down, while GL NDC is bottom-up.
The - 1.0 was introduced in #172090. Before #189476, composite_layer() was only used for the second and later layers (overlays). Since #189476 it is also used for the first layer whenever blit is unavailable, so every frame is affected. The code is unchanged on master (#188145 fixed y / width but
kept the - 1.0).
Secondary issue: texture_width / width and texture_height / height use integer division (size_t / int), so the scale truncates whenever the backing store size differs from the view size, e.g. during a resize.
Workaround: on Mesa, MESA_GLES_VERSION_OVERRIDE=3.0 makes can_blit true, and the window renders correctly (verified on the Ironlake machine). There is no workaround for NVIDIA.
| Flutter | GPU without usable blit |
|---|---|
| 3.35.7 | renders correctly |
| 3.38.0 – 3.47.x | aborts: No provider of glBlitFramebuffer found (#189322, since #172090) |
| 3.50.0-0.3.pre | starts, but the content is shifted by half the window (this issue) |
Related: #172090, #189322, #189476, #188145, #152099
Code sample
Code sample
Unmodified `flutter create --platforms=linux repro` (the default counter app). No code changes are needed.Screenshots or Video
Logs
Logs
Nothing relevant is logged; there are no GL errors or warnings. Impeller run:
[IMPORTANT:flutter/shell/platform/embedder/embedder_surface_gl_impeller.cc(127)] Using the Impeller rendering backend (OpenGLESSDF). Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.50.0-0.3.pre, on Ubuntu 24.04.5 LTS 7.0.0-38-generic, locale en_US.UTF-8)
• Framework revision 13ced38318 (6 days ago), 2026-10-28 09:52:50 -0700
• Engine revision 8ec493d4d9
• Dart version 3.14.0 (build 3.14.0-315.3.beta)
• DevTools version 2.61.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 18.1.3 (1ubuntu1)
• cmake version 3.28.1
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.5 LTS 7.0.0-38-generic
[✓] Network resources 


Activity
suryaKommana2662 commentedon Nov 3, 2026
@lunerien Thanks for the report. I tested the default Flutter counter application on Linux with both Impeller and Skia, but couldn't reproduce the issue.
My environment uses Mesa llvmpipe with OpenGL ES 3.2, and GL_EXT_framebuffer_blit is available. The reported configurations use an NVIDIA RTX 4060 with a proprietary driver and Intel HD Graphics (Ironlake) with OpenGL ES 2.0.
My environment differs from the reported configurations, so I may not be exercising the affected compositor path. Routing to
team-linuxfor further investigation.robert-ancell commentedon Nov 6, 2026
Looks like this will have to be in 3.50.1 - please hold of updating if you are getting this issue.
[Linux] Fix layer position when compositing without glBlitFramebuffer (…
andreclinio commentedon Nov 11, 2026
I still get this problem with Flutter 3.50.0 version
lunerien commentedon Nov 11, 2026
@robert-ancell said #195885 (comment) that fix will be in 3.50.1 version
andreclinio commentedon Nov 12, 2026
👍🏻
fix(linux): let the Flutter 3.50.0 engine blit on NVIDIA