Commit 9b0bc2f
WebGPURenderer: Address review feedback on PR #33419.
- RenderContexts: drop attachment-state cache; rebuild the template literal
every call. Benchmarked three variants (instance cache, WeakMap cache,
no cache) and the cache provided no net benefit. Addresses review
comments about monkey-patching render targets and avoiding comparison
complexity for a short string.
- WebGPUBackend: extract `_setTexelCopyInfo` and `_submit` module helpers
to collapse repeated field-by-field mutation patterns. `_submit`
replaces the three-line submit-array scratch pattern at 5 call sites;
`_setTexelCopyInfo` collapses 10 field assignments in
`copyTextureToTexture` into 2 helper calls. Addresses the readability
comment on line 2641.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d2f09ff commit 9b0bc2f
2 files changed
Lines changed: 27 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 56 | + | |
| 57 | + | |
79 | 58 | | |
80 | 59 | | |
81 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
60 | 78 | | |
61 | 79 | | |
62 | 80 | | |
| |||
1254 | 1272 | | |
1255 | 1273 | | |
1256 | 1274 | | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
| 1275 | + | |
1260 | 1276 | | |
1261 | 1277 | | |
1262 | 1278 | | |
| |||
1534 | 1550 | | |
1535 | 1551 | | |
1536 | 1552 | | |
1537 | | - | |
1538 | | - | |
1539 | | - | |
| 1553 | + | |
1540 | 1554 | | |
1541 | 1555 | | |
1542 | 1556 | | |
| |||
1705 | 1719 | | |
1706 | 1720 | | |
1707 | 1721 | | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
| 1722 | + | |
1711 | 1723 | | |
1712 | 1724 | | |
1713 | 1725 | | |
| |||
2626 | 2638 | | |
2627 | 2639 | | |
2628 | 2640 | | |
2629 | | - | |
2630 | | - | |
2631 | | - | |
2632 | | - | |
2633 | | - | |
2634 | | - | |
2635 | | - | |
2636 | | - | |
2637 | | - | |
2638 | | - | |
| 2641 | + | |
| 2642 | + | |
2639 | 2643 | | |
2640 | 2644 | | |
2641 | 2645 | | |
| |||
2645 | 2649 | | |
2646 | 2650 | | |
2647 | 2651 | | |
2648 | | - | |
2649 | | - | |
2650 | | - | |
| 2652 | + | |
2651 | 2653 | | |
2652 | 2654 | | |
2653 | 2655 | | |
| |||
2780 | 2782 | | |
2781 | 2783 | | |
2782 | 2784 | | |
2783 | | - | |
2784 | | - | |
2785 | | - | |
| 2785 | + | |
2786 | 2786 | | |
2787 | 2787 | | |
2788 | 2788 | | |
| |||
0 commit comments