(stylePool: StylePool)
| 50 | let sharedCharCaches = new WeakMap<StylePool, Map<string, ClusteredChar[]>>() |
| 51 | |
| 52 | function getSharedCharCache(stylePool: StylePool): Map<string, ClusteredChar[]> { |
| 53 | const existing = sharedCharCaches.get(stylePool) |
| 54 | if (existing) { |
| 55 | return existing |
| 56 | } |
| 57 | |
| 58 | const cache = new Map<string, ClusteredChar[]>() |
| 59 | sharedCharCaches.set(stylePool, cache) |
| 60 | return cache |
| 61 | } |
| 62 | |
| 63 | export function resetSharedOutputCharCachesForTesting(): void { |
| 64 | sharedCharCaches = new WeakMap() |
no test coverage detected