( events: CompositorEventController, effectConfig: RuntimeEffectConfig, windowId: string, )
| 3101 | debugSSD("runtime-emit-initial-configure", { |
| 3102 | windowId: snapshot.id, |
| 3103 | phase: "preconfigure-new-cache", |
| 3104 | }); |
| 3105 | events.emitInitialConfigure(entry.cache.window); |
| 3106 | } |
| 3107 | events.emitFocus(entry.cache.window, snapshot.isFocused); |
| 3108 | const dirtyNodeIds = takeDirtyCompositionNodeIds( |
| 3109 | snapshot.id, |
| 3110 | entry.cache, |
| 3111 | ); |
| 3112 | debugSSD("runtime-preconfigure-reevaluate", { |
| 3113 | windowId: snapshot.id, |
| 3114 | dirtyNodeIds, |
| 3115 | phase: "new-cache", |
| 3116 | }); |
| 3117 | entry.cache.reevaluate(dirtyNodeIds); |
| 3118 | } else { |
| 3119 | debugSSD("runtime-preconfigure-existing-cache", { |
| 3120 | snapshot: snapshotForDebug(snapshot), |
| 3121 | }); |
| 3122 | entry.cache.setContext(PRECONFIGURE_COMPOSITION_CONTEXT); |
| 3123 | const focusChanged = entry.latestSnapshot.isFocused !== snapshot.isFocused; |
| 3124 | entry.latestSnapshot = snapshot; |
| 3125 | entry.cache.update(snapshot); |
| 3126 | if (focusChanged) { |
| 3127 | events.emitFocus(entry.cache.window, snapshot.isFocused); |
| 3128 | } |
| 3129 | if (!initialConfiguredWindowIds.has(snapshot.id)) { |
| 3130 | initialConfiguredWindowIds.add(snapshot.id); |
| 3131 | debugSSD("runtime-emit-initial-configure", { |
| 3132 | windowId: snapshot.id, |
| 3133 | phase: "preconfigure-existing-cache", |
| 3134 | }); |
| 3135 | events.emitInitialConfigure(entry.cache.window); |
| 3136 | } |
| 3137 | const dirtyNodeIds = takeDirtyCompositionNodeIds( |
| 3138 | snapshot.id, |
| 3139 | entry.cache, |
| 3140 | ); |
| 3141 | debugSSD("runtime-preconfigure-reevaluate", { |
| 3142 | windowId: snapshot.id, |
| 3143 | dirtyNodeIds, |
| 3144 | phase: "existing-cache", |
| 3145 | }); |
| 3146 | entry.cache.reevaluate(dirtyNodeIds); |
| 3147 | } |
| 3148 | |
| 3149 | entry.preconfigured = true; |
| 3150 | debugSSD("runtime-preconfigure-result", { |
| 3151 | windowId: snapshot.id, |
| 3152 | managedWindow: entry.cache.lastManagedWindow, |
| 3153 | }); |
| 3154 | return { |
| 3155 | serialized: entry.cache.lastSerialized, |
| 3156 | transform: entry.cache.lastTransform, |
| 3157 | managedWindow: entry.cache.lastManagedWindow, |
| 3158 | windowEffects: evaluateWindowEffects(effectConfig, snapshot.id, entry), |
| 3159 | }; |
| 3160 | } |
no test coverage detected