Skip to content

[Windows][Beta regression] Small SVG icons render jagged on Flutter 3.47.0-0.1.pre #190060

Closed

Description

@h0ng95

Steps to reproduce

  1. Run flutter create --platforms=windows svg_render_bug.
  2. Run cd svg_render_bug.
  3. Run flutter pub add flutter_svg:2.2.4.
  4. Replace lib/main.dart with the code sample below.
  5. Set Windows display scaling to 100%.
  6. Switch to Flutter 3.47.0-0.1.pre beta.
  7. Run flutter clean.
  8. Run flutter pub get.
  9. Run flutter build windows --release.
  10. Run .\build\windows\x64\runner\Release\svg_render_bug.exe.
  11. Observe the circular and thin-stroked SVG icons.
  12. Switch to Flutter 3.44.4 stable.
  13. Repeat steps 7–10 without changing the source code.
  14. Compare the SVG rendering between the two Flutter versions.

Expected results

Small SVG icons should render with smooth and consistently anti-aliased edges.

The circular outlines and thin strokes should render as they do on Flutter 3.44.4 stable.

Actual results

On Flutter 3.47.0-0.1.pre beta, the edges of small SVG icons are rendered with visibly jagged, stair-stepped pixels.

The circular outlines and rounded corners lose the smooth anti-aliasing visible on Flutter 3.44.4 stable.

The issue is reproducible on Windows at 100% display scaling using the same source code and dependencies.

Affected environment

  • Flutter 3.47.0-0.1.pre beta
  • Framework revision bd1e75d918
  • Engine revision bbd15867c0
  • Dart 3.13.0-282.1.beta
  • flutter_svg: 2.2.4
  • vector_graphics: 1.2.2

Working environment

  • Flutter 3.44.4 stable
  • Framework revision ad70ec4617
  • Engine revision a10d8ac38d
  • Dart 3.12.2
  • flutter_svg: 2.2.4
  • vector_graphics: 1.2.2

The issue was reproduced in a standalone Flutter project and is not specific to the original application.

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

const plusSvg = '''
<svg width="33" height="33" viewBox="0 0 33 33"
     fill="none" xmlns="http://www.w3.org/2000/svg">
  <path
    d="M16.875 30.0834C24.2388 30.0834 30.2083 24.1139
       30.2083 16.7501C30.2083 9.38628 24.2388 3.41675
       16.875 3.41675C9.51121 3.41675 3.54167 9.38628
       3.54167 16.7501C3.54167 24.1139 9.51121 30.0834
       16.875 30.0834Z"
    stroke="#505050"
    stroke-width="2"
    stroke-linecap="round"
    stroke-linejoin="round"/>
  <path
    d="M11.5417 16.75H22.2083"
    stroke="#505050"
    stroke-width="2"
    stroke-linecap="round"/>
  <path
    d="M16.875 11.4167V22.0834"
    stroke="#505050"
    stroke-width="2"
    stroke-linecap="round"/>
</svg>
''';

const windowSvg = '''
<svg width="18" height="18" viewBox="0 0 18 18"
     fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect
    x="0.75"
    y="0.75"
    width="16.5"
    height="16.5"
    rx="3.75"
    stroke="#222222"
    stroke-width="1.5"/>
  <rect
    y="8"
    width="18"
    height="1.5"
    fill="#222222"/>
</svg>
''';

void main() {
  runApp(const SvgRenderingReproductionApp());
}

class SvgRenderingReproductionApp extends StatelessWidget {
  const SvgRenderingReproductionApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.white,
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              const Text(
                'SVG rendering reproduction',
                style: TextStyle(fontSize: 20),
              ),
              const SizedBox(height: 32),
              Row(
                mainAxisSize: MainAxisSize.min,
                children: List.generate(
                  5,
                  (_) => Padding(
                    padding: const EdgeInsets.all(12),
                    child: SvgPicture.string(
                      plusSvg,
                      width: 33,
                      height: 33,
                    ),
                  ),
                ),
              ),
              const SizedBox(height: 24),
              Row(
                mainAxisSize: MainAxisSize.min,
                children: List.generate(
                  5,
                  (_) => Padding(
                    padding: const EdgeInsets.all(12),
                    child: SvgPicture.string(
                      windowSvg,
                      width: 18,
                      height: 18,
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration Flutter stable and beta SVG rendering comparison

Left: Flutter 3.44.4 stable.
Right: Flutter 3.47.0-0.1.pre beta.

Both screenshots were captured from Windows release builds on the same machine at 100% display scaling. The beta output shows visibly stair-stepped SVG edges.

Logs

No response

Flutter Doctor output

Doctor output
[√] Flutter (Channel beta, 3.47.0-0.1.pre, on Microsoft Windows [Version 10.0.19045.6466], locale ko-KR)
    • Flutter version 3.47.0-0.1.pre on channel beta at C:\Users\allthatpay\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bd1e75d918, 2026-07-09 13:32:07 -0700
    • Engine revision bbd15867c0
    • Dart version 3.13.0 (build 3.13.0-282.1.beta)
    • DevTools version 2.59.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[√] Windows Version (10 Home 64-bit, 22H2, 2009)

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\allthatpay\AppData\Local\Android\Sdk
    • Emulator version 34.1.20.0
    X Flutter requires Android SDK 36 and the Android BuildTools 28.0.3
    ! Some Android licenses not accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.13.35919.96
    • Windows 10 SDK version 10.0.22621.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64     • Microsoft Windows [Version 10.0.19045.6466]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 150.0.7871.182
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 150.0.4078.83

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Activity

  1. puneetkukreja98 commented on Jul 28, 2026

    @puneetkukreja98
    Contributor

    Thanks for reporting this issue. I tested this on the latest stable (3.44.8) and master channel across Android, Web, macOS, iOS (debug), and Windows (all in release mode except iOS).

    I was able to reproduce the issue only on Windows on the latest master branch. (Release-mode)

    Findings:

    Stable screen-shot:

    Image

    Master screen-shot:

    Image

    Flutter doctor -v:

    [√] Flutter (Channel master, 3.47.0-1.0.pre-237, on Microsoft Windows [Version 10.0.26200.7840], locale en-IN) [2.2s]
        • Flutter version 3.47.0-1.0.pre-237 on channel master at C:\Developer\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 7870373605 (7 hours ago), 2026-07-28 12:32:27 +0900
        • Engine revision 7870373605
        • Dart version 3.14.0 (build 3.14.0-65.0.dev)
        • DevTools version 2.60.0
        • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager,
          omit-legacy-version-file, enable-windowing, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
    
    [√] Windows Version (Windows 11 or higher, 25H2, 2009) [2.1s]
    
    [√] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [2.4s]
        • Android SDK at C:\Users\Puneet\AppData\Local\Android\sdk
        • Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
        • Platform android-37.1, build-tools 37.0.0
        • Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web [159ms]
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.3.2) [158ms]
        • Visual Studio at C:\Program Files\Microsoft Visual Studio\18\Community
        • Visual Studio Community 2026 version 18.3.11520.95
        • Windows 10 SDK version 10.0.26100.0
    
    [√] Connected device (3 available) [555ms]
        • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26200.7840]
        • Chrome (web)      • chrome  • web-javascript • Google Chrome 150.0.7871.115
        • Edge (web)        • edge    • web-javascript • Microsoft Edge 150.0.4078.99
    
    [√] Network resources [813ms]
        • All expected network resources are available.
    
    • No issues found!
  2. added
    platform-windowsBuilding on or for Windows specifically
    team-windowsOwned by the Windows platform team
    and removed
    in triagePresently being triaged by the triage team
    team-windowsOwned by the Windows platform team
    on Jul 28, 2026
  3. puneetkukreja98 commented on Jul 28, 2026

    @puneetkukreja98
    Contributor

    Update: I also ran the app in debug mode on Windows, and the issue still exists. When I checked the logs, the default engine was Impeller. After running the code with Impeller disabled, the issue was no longer present. The conclusion from this is that it is related to Impeller, so I'm routing this to the Engine team.
    Console:

    flutter run
    Connected devices:
    Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26200.7840]
    Chrome (web)      • chrome  • web-javascript • Google Chrome 150.0.7871.115
    Edge (web)        • edge    • web-javascript • Microsoft Edge 150.0.4078.99
    [1]: Windows (windows)
    [2]: Chrome (chrome)
    [3]: Edge (edge)
    Please choose one (or "q" to quit): 1
    Launching lib\main.dart on Windows in debug mode...
    Building Windows application...                                    22.8s
    √ Built build\windows\x64\runner\Debug\svg_test_app.exe
    [IMPORTANT:flutter/shell/platform/embedder/embedder_surface_gl_impeller.cc(127)] Using the Impeller rendering backend (OpenGLESSDF).

    Additionally, I tested this on macOS with Impeller both enabled and disabled, and the issue does not exist there. It is specific to Windows.

  4. added
    engineflutter/engine related. See also e: labels.
    e: impellerImpeller rendering backend issues and features requests
    packageflutter/packages repository. See also p: labels.
    p: flutter_svgThe Flutter SVG drawing packages
    on Jul 28, 2026
  5. added
    P1High-priority issues at the top of the work list
    on Jul 28, 2026
  6. gaaclarke commented on Jul 28, 2026

    @gaaclarke
    Member

    Note to devs: This can't be reproduced on cloudtop vm since display scaling can't be set to 100%. This has to be debugged on an actual windows device.

    Setting the scaling to 100% is setting up the rendering scenario with the lowest pixels per svg. The amount of affordances in the SDF renderer does not take this scale into account. I suspect this scenario can be duplicated on other platforms like macos by turning down the ui scaling. On modern monitors this makes things small beyond being usable and the artifacts practically invisible. The screenshots are a bit of a misnomer in that sense that it is taking something that on a modern monitor would be teeny tiny and blowing it up to accentuate the rendering artifacts. Low DPI monitors cannot be ruled out though, especially in windows/linux.

    We can try to make the antialiasing scale based on physical size, instead of a fixed pixel size.

  7. gaaclarke commented on Jul 31, 2026

    @gaaclarke
    Member

    There are 2 issues happening here:

    1. MSAA isn't set up in windows
    2. The bigger problem that the uber_sdf shader isn't drawing antialiasing because the derivative functions in that shader are silently failing. There are specific rules how those functions are supposed to be used in order to make sure that the threads calculating the neighboring fragments can be sampled to generate a gradient. We aren't seeing that being a problem on Apple hardware or the software simulators.
  8. filiph commented on Aug 1, 2026

    @filiph
    Contributor

    Hi, I created two issues that may or may not be supersets of this issue and wanted to link them:

  9. github-actions commented on Aug 17, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.p: flutter_svgThe Flutter SVG drawing packagespackageflutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyteam-engineOwned by Engine team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions