Commit c5e9ef3
committed
fix(virtual-bg): avoid GPU/canvas reallocation every frame
- texMaskFiltered, texBlurred1, texBlurred2 were reallocated on every single render() call
- reallocating GPU texture every frame is a confirmed overhead on some GPUs/drivers
- needs to be only reallocated when the actual size changes
- similar with output canvas element
- impact is negligible, so more a hardening
Assisted-by: ClaudeCode:claude-sonnet-51 parent ea53cec commit c5e9ef3
2 files changed
Lines changed: 39 additions & 10 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
489 | | - | |
490 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
491 | 499 | | |
492 | 500 | | |
493 | 501 | | |
| |||
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
294 | 302 | | |
295 | 303 | | |
296 | 304 | | |
| |||
527 | 535 | | |
528 | 536 | | |
529 | 537 | | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
535 | 549 | | |
536 | 550 | | |
537 | 551 | | |
| |||
718 | 732 | | |
719 | 733 | | |
720 | 734 | | |
721 | | - | |
722 | | - | |
723 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
724 | 745 | | |
725 | 746 | | |
726 | 747 | | |
| |||
0 commit comments