Repository navigation
Commit 69c8c61
authored
[CP-stable][Android] Close FlutterRenderer texture image SyncFence objects immediately after waiting on them (flutter#189272)
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
flutter#188161
### Impact Description:
This issue can causes crashes in apps that use external textures (often used for rendering video). On Arm Mali GPUs each frame may leak a file descriptor, and the app will crash when the process reaches the file descriptor limit.
### Changelog Description:
flutter#188161 When apps that use external textures run on some GPUs (such as Arm Mali), it can cause a resource leak that eventually crashes the app.
### Workaround:
Is there a workaround for this issue?
No
### Risk:
What is the risk level of this cherry-pick?
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
### Validation Steps:
What are the steps to validate that this fix works?
* Run the example app from the `flutter-webrtc` package on a Mali-based Android device
* Go to the "GetUserMedia" screen and turn on the camera.
* Watch the count of file descriptors in `/proc/[pid]/fd` for the app process and check that it does not increase as the captured video is displayed1 parent 8a30874 commit 69c8c61
2 files changed
Lines changed: 17 additions & 5 deletions
File tree
- engine/src/flutter/shell/platform/android
- io/flutter/embedding/engine/renderer
- test/io/flutter/embedding/engine/renderer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
789 | | - | |
790 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | | - | |
1070 | | - | |
| 1069 | + | |
1071 | 1070 | | |
1072 | 1071 | | |
1073 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
1074 | 1075 | | |
1075 | 1076 | | |
1076 | 1077 | | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1077 | 1090 | | |
0 commit comments