Commit f208f6c
perf: cache scalingModeRenderer feature flag in GL/Metal view controllers
Replace repeated PVFeatureFlags.shared.isEnabled(.scalingModeRenderer)
calls in render loops with a single lazy-initialized stored property.
The flag is read once on first access and reused for the session lifetime.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0acdf51 commit f208f6c
File tree
2 files changed
+12
-6
lines changed- PVUI/Sources/PVUIBase/PVGLViewController
2 files changed
+12
-6
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
| 344 | + | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| |||
468 | 471 | | |
469 | 472 | | |
470 | 473 | | |
471 | | - | |
| 474 | + | |
472 | 475 | | |
473 | 476 | | |
474 | 477 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
788 | 791 | | |
789 | 792 | | |
790 | 793 | | |
791 | | - | |
| 794 | + | |
792 | 795 | | |
793 | 796 | | |
794 | 797 | | |
| |||
944 | 947 | | |
945 | 948 | | |
946 | 949 | | |
947 | | - | |
| 950 | + | |
948 | 951 | | |
949 | 952 | | |
950 | 953 | | |
| |||
2088 | 2091 | | |
2089 | 2092 | | |
2090 | 2093 | | |
2091 | | - | |
| 2094 | + | |
2092 | 2095 | | |
2093 | 2096 | | |
2094 | 2097 | | |
| |||
3388 | 3391 | | |
3389 | 3392 | | |
3390 | 3393 | | |
3391 | | - | |
| 3394 | + | |
3392 | 3395 | | |
3393 | 3396 | | |
3394 | 3397 | | |
| |||
0 commit comments