Skip to content

[Impeller] Inconsistent border rendering with thin width #162378

@khoadng

Description

@khoadng

Steps to reproduce

Run the sample code

Device: Pixel 6a API 34 (Emulator)

Expected results

Border rendered correctly

Actual results

Some lines seem thinner, whereas others appear thicker.

Code sample

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: SafeArea(
        child: SingleChildScrollView(
          child: Column(
            children: [
              for (int i = 0; i < 100; i++)
                _Frame(
                  child: ListTile(
                    title: Text(''),
                  ),
                ),
            ],
          ),
        ),
      ),
    );
  }
}

class _Frame extends StatelessWidget {
  const _Frame({
    required this.child,
  });

  final Widget child;

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        border: Border(
          bottom: BorderSide(
            color: Colors.white,
            width: 0.15,
          ),
        ),
      ),
      child: child,
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
With Impeller No Impeller

Comparison of the two versions.

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.29.0-1.0.pre.144, on macOS 15.1 24B2083 darwin-arm64, locale en-VN) [4.5s]
    • Flutter version 3.29.0-1.0.pre.144 on channel master at /Users/khoa/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 46f96a44e4 (8 hours ago), 2025-01-29 11:02:53 +0530
    • Engine revision 46f96a44e4
    • Dart version 3.8.0 (build 3.8.0-24.0.dev)
    • DevTools version 2.42.0

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,491ms]
    • Android SDK at /Users/khoa/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Users/khoa/Applications/Android Studio.app/Contents/jbr/Contents/Home/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.4+-12422083-b607.1)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [818ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [8ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.2) [8ms]
    • Android Studio at /Users/khoa/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] VS Code (version 1.96.4) [6ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (3 available) [5.7s]
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64 • Android 14 (API 34) (emulator)
    • iPhone 16 Pro Max (mobile)  • 33B397ED-CCA5-4780-BD6C-E3EF3C8CCE0A • ios           • com.apple.CoreSimulator.SimRuntime.iOS-18-2 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64  • macOS 15.1 24B2083 darwin-arm64

[✓] Network resources [1,430ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: qualityA truly polished experiencec: renderingUI glitches reported at the engine/skia or impeller rendering levele: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.28Found to occur in 3.28found in release: 3.29Found to occur in 3.29has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions