( events: CompositorEventController, snapshots: WaylandLayerSnapshot[], )
| 2461 | // disappear again once the visual animation completed. |
| 2462 | const reevaluated = forceFullReevaluation |
| 2463 | ? entry.cache.reevaluate() |
| 2464 | : entry.cache.reevaluate(reevaluateNodeIds); |
| 2465 | debugLabel("evaluate-cached-reevaluate", { |
| 2466 | windowId, |
| 2467 | dirtyNodeIds: reevaluateNodeIds, |
| 2468 | forceFullReevaluation, |
| 2469 | labels: summarizeSerializedLabels(reevaluated.serialized), |
| 2470 | }); |
| 2471 | return { |
| 2472 | serialized: reevaluated.serialized, |
| 2473 | treeUpdate: |
| 2474 | !forceFullReevaluation && reevaluateNodeIds.length > 0 |
| 2475 | ? "patches" |
| 2476 | : "full", |
| 2477 | transform: entry.cache.lastTransform, |
| 2478 | managedWindow: entry.cache.lastManagedWindow, |
| 2479 | windowEffects: evaluateWindowEffects(effectConfig, windowId, entry), |
| 2480 | dirtyNodeIds: forceFullReevaluation ? [] : reevaluateNodeIds, |
| 2481 | nextPollInMs: hasWindowAnimations(windowId) ? 0 : peekNextPollDelay(), |
| 2482 | }; |
| 2483 | } |
| 2484 | |
| 2485 | function writeCachedCompositionUpdate( |
| 2486 | bridge: EmbeddedRuntimeBridge, |
| 2487 | requestId: number, |
| 2488 | windowId: string, |
| 2489 | result: ReturnType<typeof evaluateCached>, |
| 2490 | cache: CompositionEvaluationCache | undefined, |
| 2491 | ): void { |
| 2492 | if (result.treeUpdate === "none") { |
| 2493 | return; |
| 2494 | } |
| 2495 | if (result.treeUpdate === "uniforms") { |
| 2496 | const uniformPatches = result.uniformPatches ?? []; |
| 2497 | if (uniformPatches.length === 0) { |
| 2498 | throw new Error( |
| 2499 | `cached uniform composition update for ${windowId} has no patches`, |
| 2500 | ); |
| 2501 | } |
| 2502 | const registeredSlotIds = uniformPatches.map((patch) => |
no test coverage detected