Repository: flutter
Issue: [Impeller] Drawing lines results in ugly, jagged and aliased lines with Impeller, compared to Skia.
Labels: engine,c: rendering,has reproducible steps,P2,e: impeller,team-engine,triaged-engine,found in release: 3.16,found in release: 3.17

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Draw some vector shapes with canvas.drawPath, with line width thin enough / zoomed out enough
2. Run with Impeller enabled on macOS or iOS
3. Observe jagged and ugly lines, too opaque line drawing compared to Skia

### Expected results

Would expect the vector path and line drawing to match that of Skia, at least close to the quality or producing beautiful results.

### Actual results

The rendered lines are ugly, jagged, aliased and are too opaque and bright compared to Skia.

### Code sample

<details><summary>Code sample</summary>

See repository with example generating the screenshots below: [https://github.com/Sakari369/flutter_lines_bug](https://github.com/Sakari369/flutter_lines_bug)

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

Line rendering with Skia:

![Screenshot 2023-11-19 at 12 04 35](https://github.com/flutter/flutter/assets/1212726/edf2043c-05ab-4902-8254-83c5ffdff080)

Line rendering with Impeller:

![Screenshot 2023-11-19 at 12 03 57](https://github.com/flutter/flutter/assets/1212726/12f91895-2462-4a23-94ba-8eb68681b9ed)

</details>


### Logs

<details><summary>Logs</summary>

```console
If I paste the logs here, github wont let me make the issue
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1 23B74 darwin-arm64, locale en-FI)
    • Flutter version 3.16.0 on channel stable at /Users/sakari/dvl/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (4 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/sakari/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = /Users/sakari/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version unknown)
    • Android Studio at /Applications/Android Studio Preview.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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.8+0-17.0.8b1000.22-10799086)

[✓] Android Studio (version 2023.1)
    • Android Studio at /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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.82.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.1 23B74 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.90
    ! Error: Browsing on the local area network for Eero’s iPad. Ensure the device is unlocked and attached with a cable or associated with
      the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Sakari’s iPad. Ensure the device is unlocked and attached with a cable or associated
      with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```
```

</details>