Repository: flutter
Issue: Muddy Colors when resizing window
Labels: engine,platform-linux,c: rendering,a: desktop,has reproducible steps,P2,found in release: 2.2,found in release: 2.5,team-linux,triaged-linux

## Steps to Reproduce

Create a project with the following `main.dart` and resize the window slightly.

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      title: 'Rasterize Color Issue',
      theme: ThemeData.dark(),
      home: Scaffold(
        body: Center(
          child: Container(
            height: 3,
            decoration: BoxDecoration(
              color: Colors.white,
              border: Border.all(color: Colors.black),
            ),
          ),
        ),
      ),
    ),
  );
}
```

For some window sizes, both colors (container and border) come out clear:
![2021080213:34:37_screenshot_sel](https://user-images.githubusercontent.com/24209580/127856144-9672b84e-84dd-4bef-b233-ae1a1b440018.png)

For other sizes, both colors are muddy:
![2021080213:34:04_screenshot_sel](https://user-images.githubusercontent.com/24209580/127856149-8fdd1daa-a9c0-459f-b3bb-e7ce601c3911.png)

Since the images are very small here is a zoomed in version:
![2021080213:42:18_screenshot_sel](https://user-images.githubusercontent.com/24209580/127856661-ee65e919-8e3f-4f93-a93a-fbd46afc0360.png)

Although the second image is effectively one pixel wider, both colors are muddy.

I guess this has something to do with rasterizing, but its definitely annoying since it is 
very noticable.

<details>
  <summary>Doctor</summary>

  ```
[✓] Flutter (Channel master, 2.4.0-5.0.pre.180, on Ubuntu 18.04.5 LTS
    5.4.0-66-generic, locale en_US.UTF-8)
    • Flutter version 2.4.0-5.0.pre.180 at
      /home/omni/repos/flutter_web/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 41497f9587 (9 days ago), 2021-07-24 03:13:03
      -0400
    • Engine revision 4a1bc7329e
    • Dart version 2.14.0 (build 2.14.0-349.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version
    30.0.0-rc2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more
      details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup
      for more details.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /snap/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[✓] Android Studio (version 3.5)
    • Android Studio at /opt/AppDev/SDK/android-studio
    • 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
      1.8.0_202-release-1483-b49-5587405)

[✓] VS Code
    • VS Code at /snap/code/current
    • Flutter extension version 3.24.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 18.04.5 LTS
      5.4.0-66-generic
    • Chrome (web)    • chrome • web-javascript • Chromium 92.0.4515.107
      snap

! Doctor found issues in 1 category.

```

</details>