This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit f60d9a9
authored
[Impeller] migrate blur to calculating coefficients on the cpu (#49512)
issue: flutter/flutter#131580
This factors out the gaussian blur fragment shader to be a more generic kernel fragment shader. We can't use this for the old gaussian blur because it's kernel is unbounded in one dimension. I implemented this by passing in the coefficients into the UBO so it can't support that.
Profile after change:
```
"average_vsync_transitions_missed": 2.0,
"90th_percentile_vsync_transitions_missed": 2.0,
"99th_percentile_vsync_transitions_missed": 2.0,
"average_vsync_frame_lag": 0.0,
"90th_percentile_vsync_frame_lag": 0.0,
"99th_percentile_vsync_frame_lag": 0.0,
"average_layer_cache_count": 0.0,
"90th_percentile_layer_cache_count": 0.0,
"99th_percentile_layer_cache_count": 0.0,
"average_frame_request_pending_latency": 16636.624373956594,
"90th_percentile_frame_request_pending_latency": 16718.0,
"99th_percentile_frame_request_pending_latency": 16761.0,
"worst_layer_cache_count": 0.0,
"average_layer_cache_memory": 0.0,
"90th_percentile_layer_cache_memory": 0.0,
"99th_percentile_layer_cache_memory": 0.0,
"worst_layer_cache_memory": 0.0,
"average_picture_cache_count": 0.0,
"90th_percentile_picture_cache_count": 0.0,
"99th_percentile_picture_cache_count": 0.0,
"worst_picture_cache_count": 0.0,
"average_picture_cache_memory": 0.0,
"90th_percentile_picture_cache_memory": 0.0,
"99th_percentile_picture_cache_memory": 0.0,
"worst_picture_cache_memory": 0.0,
"total_ui_gc_time": 1.65,
"30hz_frame_percentage": 0.0,
"60hz_frame_percentage": 100.0,
"80hz_frame_percentage": 0.0,
"90hz_frame_percentage": 0.0,
"120hz_frame_percentage": 0.0,
"illegal_refresh_rate_frame_count": 0,
"average_gpu_frame_time": 21.875,
"90th_percentile_gpu_frame_time": 31.25,
"99th_percentile_gpu_frame_time": 31.25,
"worst_gpu_frame_time": 31.25,
"average_cpu_usage": 162.86326532653064,
"90th_percentile_cpu_usage": 167.3,
"99th_percentile_cpu_usage": 168.500003,
"average_gpu_usage": 93.26530612244898,
"90th_percentile_gpu_usage": 94.0,
"99th_percentile_gpu_usage": 95.0,
"average_memory_usage": 113.56696428571429,
"90th_percentile_memory_usage": 145.484375,
"99th_percentile_memory_usage": 152.75
```
This is a 13% (21.25 / 25 ) drop in `average_gpu_frame_time` from the last profile in #49299.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style1 parent 0bbb4d6 commit f60d9a9
File tree
11 files changed
+563
-27
lines changed- ci/licenses_golden
- impeller
- entity
- contents
- filters
- shaders/gaussian_blur
- tools
11 files changed
+563
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5231 | 5231 | | |
5232 | 5232 | | |
5233 | 5233 | | |
| 5234 | + | |
| 5235 | + | |
| 5236 | + | |
5234 | 5237 | | |
5235 | 5238 | | |
5236 | 5239 | | |
| |||
8041 | 8044 | | |
8042 | 8045 | | |
8043 | 8046 | | |
| 8047 | + | |
| 8048 | + | |
| 8049 | + | |
8044 | 8050 | | |
8045 | 8051 | | |
8046 | 8052 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
| 250 | + | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| |||
447 | 453 | | |
448 | 454 | | |
449 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
450 | 466 | | |
451 | 467 | | |
452 | 468 | | |
| |||
813 | 829 | | |
814 | 830 | | |
815 | 831 | | |
| 832 | + | |
| 833 | + | |
816 | 834 | | |
817 | 835 | | |
818 | 836 | | |
| |||
Lines changed: 58 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | | - | |
| 152 | + | |
151 | 153 | | |
152 | | - | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
172 | | - | |
173 | | - | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
356 | 359 | | |
357 | 360 | | |
358 | 361 | | |
| |||
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
377 | 381 | | |
378 | 382 | | |
379 | 383 | | |
| |||
429 | 433 | | |
430 | 434 | | |
431 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
432 | 463 | | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
13 | 24 | | |
14 | 25 | | |
15 | 26 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
384 | 409 | | |
385 | 410 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments