Repository: flutter
Issue: Generating images while the app is in the background using `PictureRecorder` does not work.
Labels: engine,dependency: dart,customer: crowd,customer: solaris,a: images,c: rendering,has reproducible steps,P2,found in release: 2.0,found in release: 2.1,team-engine,triaged-engine

## Steps to Reproduce

A full example project that can reproduce this behaviour can be found here:
https://github.com/JordyLangen/flutter-bug-reports 

The bug-causing behaviour starts here:
https://github.com/JordyLangen/flutter-bug-reports/blob/main/lib/main.dart#L124

Steps to reproduce:
1. Start the app, and press the button "Trigger async thumbnail creation"
2. Withtin two seconds, press the Home button in Android.
3. Reopen the app.

**Expected results:**
The thumbnail image (right hand side image) should be a square image, with a black background and a round clipped bird.
<img src="https://user-images.githubusercontent.com/418977/113301001-cfc3db80-92fe-11eb-89d5-8b871d8c6c59.png" height="450" />


**Actual results:** 
The thumbnail image (right hand side image) is be a square image, with a black background and no round clipped bird.'
<img src="https://user-images.githubusercontent.com/418977/113300970-c89ccd80-92fe-11eb-8d76-3866ca9ae16d.png" height="450" />

## Additional sidenote
This issue seems to be fixed when enabling this: `enable-software-rendering`
However, in our case, that is not a solution as it turns other parts of the application into an ugly mess.

<details>
  <summary>Logs</summary>

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
❯ flutter analyze
Analyzing flutter_bug_reports...
No issues found! (ran in 3.7s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
❯ flutter doctor -v
[✓] Flutter (Channel unknown, 1.22.6, on macOS 11.2.1 20D74 darwin-x64, locale en-NL)
    • Flutter version 1.22.6 at /Users/[redacted]/flutter
    • Framework revision 9b2d32b605 (10 weeks ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/jordy.langensignify.com/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin installed
    • Dart plugin version 203.7759

[✓] VS Code (version 1.55.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0


[✓] Connected device (4 available)
    • SM G950F (mobile) • ce04171489ad461505 • android-arm64  • Android 9 (API 28)
    • macOS (desktop)   • macos              • darwin-x64     • macOS 11.2.1 20D74 darwin-x64
    • Web Server (web)  • web-server         • web-javascript • Flutter Tools
    • Chrome (web)      • chrome             • web-javascript • Google Chrome 89.0.4389.90

! Doctor found issues in 1 category.
```

</details>