Repository navigation
Fixes MSAA on the linux embedder. - #191379
Conversation
639e379 to
e522dfd
Compare
There was a problem hiding this comment.
Code Review
This pull request adds support for configuring multisample anti-aliasing (MSAA) attachments in FlFramebuffer when Impeller is enabled on Linux, updating FlEngine to track the Impeller state and introducing corresponding unit tests. Feedback suggests resetting OpenGL resource IDs to 0 in fl_framebuffer_dispose to prevent potential double-deletion issues, and refactoring fl_framebuffer_new_multisample to eliminate duplicated fallback paths.
e522dfd to
f75df78
Compare
There was a problem hiding this comment.
Code Review
This pull request adds support for implicit and offscreen Multisample Anti-Aliasing (MSAA) in the Flutter Linux embedder when Impeller is enabled, updating framebuffer creation and adding corresponding unit tests. The review feedback suggests simplifying the offscreen MSAA support check by targeting OpenGL 3.0+ directly, removing an unused parameter in attach_depth_stencil, and refactoring the MSAA configuration logic to reduce nesting and eliminate duplicate fallback code.
robert-ancell
left a comment
There was a problem hiding this comment.
With a few changes should be good to land.
flutter/flutter@65c9a8d...9a82789 2026-08-24 [email protected] Roll Packages from 252bb33 to df2ba94 (5 revisions) (flutter/flutter#191578) 2026-08-24 [email protected] Roll Dart SDK from cb056da580b6 to 78bbc37b6ff6 (13 revisions) (flutter/flutter#191574) 2026-08-24 [email protected] Roll Skia from 50452b13f05b to 57968d087d18 (1 revision) (flutter/flutter#191572) 2026-08-24 [email protected] Move more RSE rendering cases to complex_rse.frag (flutter/flutter#191235) 2026-08-24 [email protected] Roll Skia from 925e13559532 to 50452b13f05b (2 revisions) (flutter/flutter#191570) 2026-08-24 [email protected] iOS: Add stylus pointer tests (flutter/flutter#191564) 2026-08-24 [email protected] iOS: Improve FlutterEngineGroup tests (flutter/flutter#191563) 2026-08-24 [email protected] Roll Skia from c78782c7c1c2 to 925e13559532 (5 revisions) (flutter/flutter#191568) 2026-08-24 [email protected] Roll Skia from 886302c7c68e to c78782c7c1c2 (1 revision) (flutter/flutter#191566) 2026-08-24 [email protected] Revert "Improve initial size and placement logic for popups and toolt…ips on Linux (#189994) (flutter/flutter#191498) 2026-08-23 [email protected] Roll Fuchsia Linux SDK from Cqs-NyeELd60hqv1e... to 8Xu4ujBJniC0nQGx3... (flutter/flutter#191561) 2026-08-23 [email protected] Fixes MSAA on the linux embedder. (flutter/flutter#191379) 2026-08-23 [email protected] Remove Material/Cupertino references in error messages (flutter/flutter#191305) 2026-08-23 [email protected] Roll Skia from a1825062f832 to 886302c7c68e (1 revision) (flutter/flutter#191559) 2026-08-23 [email protected] Roll Skia from ad2106c0bb64 to a1825062f832 (1 revision) (flutter/flutter#191555) 2026-08-22 [email protected] Roll Fuchsia Linux SDK from ic6GjOSn-KN508XyK... to Cqs-NyeELd60hqv1e... (flutter/flutter#191547) 2026-08-22 [email protected] [WebParagraph] Fixing minor problem with getBoxesForRange (flutter/flutter#191419) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
FlViewRendererSubsurface is the default renderer on Wayland, so Flutter
apps running with Impeller on Mesa drivers currently show nothing but a
black window.
It picked its framebuffer format from
epoxy_has_gl_extension("GL_EXT_texture_format_BGRA8888"), which asks
what the driver is capable of rather than what the engine actually
rendered. The frame was composited into a BGRA framebuffer while the
engine had rendered RGBA, so nothing reached the screen. The failure is
silent: the framebuffer is complete, no GL errors are raised, and the
Wayland surface is committed as normal.
That check used to be correct, and was invalidated by 5f97c7f
("Fixes MSAA on the linux embedder", flutter#191379) in two ways:
- It replaced the identical check in fl_opengl_frame.cc with one that
reads the format the engine reported in the layer's backing store,
making the extension check the stale copy of a rule that had moved on.
- It made the engine render RGBA even where the extension is advertised.
With Impeller the backing store is now allocated by
fl_framebuffer_new_multisample(), whose offscreen MSAA path attaches a
multisample renderbuffer of GL_RGBA8 and no texture, and fl_engine.cc
reports GL_RGBA8 for those. Driver capability and rendered format are
therefore no longer the same question.
FlViewRendererSubsurface was written before that landed and merged
cleanly after it, in 706edcd ("Add FlViewRendererSubsurface",
flutter#191389), because the two changes touch different files and so never
conflicted textually.
Move the rule into fl_compositor_opengl_get_frame_format() and use it
from both paths so they cannot disagree again. fl_engine.cc remains the
only place that chooses a format; both consumers now follow what it
reports. Every backing store in a frame is created from context-wide
capabilities, so they all share a format, and the first one describes
the frame. Take it from the first backing store rather than the first
layer, as platform views carry no format and would otherwise decide it
by being drawn first.
The bug is not reachable from a unit test, as presenting a frame
requires a realized Wayland subsurface and the tests run on X11, so test
the shared function directly, including that an advertised extension
does not change its result.
…r#12578) flutter/flutter@65c9a8d...9a82789 2026-08-24 [email protected] Roll Packages from 252bb33 to df2ba94 (5 revisions) (flutter/flutter#191578) 2026-08-24 [email protected] Roll Dart SDK from cb056da580b6 to 78bbc37b6ff6 (13 revisions) (flutter/flutter#191574) 2026-08-24 [email protected] Roll Skia from 50452b13f05b to 57968d087d18 (1 revision) (flutter/flutter#191572) 2026-08-24 [email protected] Move more RSE rendering cases to complex_rse.frag (flutter/flutter#191235) 2026-08-24 [email protected] Roll Skia from 925e13559532 to 50452b13f05b (2 revisions) (flutter/flutter#191570) 2026-08-24 [email protected] iOS: Add stylus pointer tests (flutter/flutter#191564) 2026-08-24 [email protected] iOS: Improve FlutterEngineGroup tests (flutter/flutter#191563) 2026-08-24 [email protected] Roll Skia from c78782c7c1c2 to 925e13559532 (5 revisions) (flutter/flutter#191568) 2026-08-24 [email protected] Roll Skia from 886302c7c68e to c78782c7c1c2 (1 revision) (flutter/flutter#191566) 2026-08-24 [email protected] Revert "Improve initial size and placement logic for popups and toolt…ips on Linux (#189994) (flutter/flutter#191498) 2026-08-23 [email protected] Roll Fuchsia Linux SDK from Cqs-NyeELd60hqv1e... to 8Xu4ujBJniC0nQGx3... (flutter/flutter#191561) 2026-08-23 [email protected] Fixes MSAA on the linux embedder. (flutter/flutter#191379) 2026-08-23 [email protected] Remove Material/Cupertino references in error messages (flutter/flutter#191305) 2026-08-23 [email protected] Roll Skia from a1825062f832 to 886302c7c68e (1 revision) (flutter/flutter#191559) 2026-08-23 [email protected] Roll Skia from ad2106c0bb64 to a1825062f832 (1 revision) (flutter/flutter#191555) 2026-08-22 [email protected] Roll Fuchsia Linux SDK from ic6GjOSn-KN508XyK... to Cqs-NyeELd60hqv1e... (flutter/flutter#191547) 2026-08-22 [email protected] [WebParagraph] Fixing minor problem with getBoxesForRange (flutter/flutter#191419) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
O app abre MEI/MusicXML, gera a cena em `.vsb` (Verovio Score Bridge) por FFI num isolate e a desenha com o `ScenePainter` do score_bridge, em vez de renderizar dotLottie. - `third_party/verovio_lottie` -> `third_party/verovio_flutter_bridge`, que traz os pacotes `verovio` (bindings FFI do fork que exporta `.vsb`) e `score_bridge` (parser + pintor). - `lib/verovio_render.dart`: renderiza a partitura inteira num isolate — o toolkit nativo é um ponteiro que não atravessa isolates — e valida o pacote antes de entregar ao parser. - `lib/verovio_resources.dart`: as fontes de gravação viram um zip único (`assets/verovio_data.zip`, de `tool/build_verovio_assets.sh`) extraído na primeira execução, porque o bundler de assets do Flutter não recursa em diretórios. - `lib/main.dart`: a página é engravada para a caixa medida em pixels de dispositivo, com zoom e navegação entre páginas. - `test/vsb_render_test.dart`: integração MEI -> `.vsb` -> `ScenePainter`, pulada quando os artefatos não versionados estão ausentes. Junto, um `justfile` com as tarefas do projeto. `just run` desliga o Impeller: no Linux ele não resolve o MSAA e serrilha todo o vetorial, o que numa partitura (path fino) é grosseiro — flutter/flutter#191171, corrigido em master por flutter/flutter#191379, ainda fora do stable 3.47.4. Co-Authored-By: Claude Opus 5 <[email protected]>
fixes #191171
This is the linux equivalent of the windows change: #190256
On desktop we normally need to have an explicit resolution step for MSAA to work, this adds that explicit step. On linux we were already blitting from this framebuffer so we didn't need to provide an explicit resolve step, it already existed.
I also removed code about using bgra. This was impeding our usage of MSAA render buffers, on linux I don't think there is a reason we have to use BGRA.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
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. Comments from the
gemini-code-assistbot 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.