Commit 31c4875
authored
[CP-stable][Impeller] Maintain a global map of each context's currently active thread-local command pools (#170013)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?
#169208
### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples
Fixes a memory leak in the Impeller Vulkan back end.
### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)
The memory usage of apps using Impeller/Vulkan will increase as frames are rendered. Memory consumption will grow until the Android activity enters the stopped state.
### Workaround:
Is there a workaround for this issue?
Disabling Impeller
### Risk:
What is the risk level of this cherry-pick?
- [ x ] Medium
### Test Coverage:
Are you confident that your fix is well-tested by automated tests?
- [ x ] Yes
### Validation Steps:
What are the steps to validate that this fix works?
Start an app using Impeller/Vulkan that renders frames nonstop (for example, video playback). Leave it running for several minutes. Check memory metrics with a tool like `adb shell dumpsys meminfo` and verify that memory usage is stable.1 parent 46a4c05 commit 31c4875
File tree
5 files changed
+70
-27
lines changed- engine/src/flutter/impeller
- golden_tests
- renderer/backend/vulkan
5 files changed
+70
-27
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
| |||
274 | 279 | | |
275 | 280 | | |
276 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
277 | 285 | | |
278 | 286 | | |
279 | 287 | | |
| |||
Lines changed: 31 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
178 | 191 | | |
179 | 192 | | |
180 | 193 | | |
| |||
187 | 200 | | |
188 | 201 | | |
189 | 202 | | |
190 | | - | |
191 | | - | |
| 203 | + | |
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
| |||
201 | 213 | | |
202 | 214 | | |
203 | 215 | | |
204 | | - | |
| 216 | + | |
205 | 217 | | |
206 | 218 | | |
207 | 219 | | |
208 | | - | |
| 220 | + | |
209 | 221 | | |
210 | 222 | | |
211 | 223 | | |
| |||
275 | 287 | | |
276 | 288 | | |
277 | 289 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
286 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
287 | 302 | | |
288 | 303 | | |
289 | 304 | | |
290 | | - | |
| 305 | + | |
291 | 306 | | |
292 | 307 | | |
293 | | - | |
| 308 | + | |
294 | 309 | | |
295 | 310 | | |
296 | 311 | | |
297 | 312 | | |
298 | 313 | | |
299 | | - | |
| 314 | + | |
300 | 315 | | |
301 | | - | |
| 316 | + | |
302 | 317 | | |
303 | 318 | | |
304 | 319 | | |
| |||
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 113 | + | |
| 114 | + | |
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | | - | |
124 | | - | |
| 119 | + | |
125 | 120 | | |
126 | 121 | | |
127 | 122 | | |
| |||
137 | 132 | | |
138 | 133 | | |
139 | 134 | | |
140 | | - | |
| 135 | + | |
141 | 136 | | |
142 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
143 | 141 | | |
144 | 142 | | |
| 143 | + | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
231 | 250 | | |
232 | 251 | | |
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
424 | | - | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
| |||
0 commit comments