MCPcopy Create free account
hub / github.com/bea4dev/ShojiWM / syncLayerSnapshots

Function syncLayerSnapshots

tools/decoration-runtime.ts:2463–2499  ·  view source on GitHub ↗
(
  events: CompositorEventController,
  snapshots: WaylandLayerSnapshot[],
)

Source from the content-addressed store, hash-verified

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
2485function 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) =>

Callers 1

evaluateLayerEffectsFunction · 0.85

Calls 13

updateLayerSnapshotsFunction · 0.90
dropLayerDependenciesFunction · 0.90
createRuntimeLayerEntryFunction · 0.85
layerUsableAreaChangedFunction · 0.85
emitCreateLayerMethod · 0.80
emitUpdateLayerMethod · 0.80
emitDestroyLayerMethod · 0.80
deleteMethod · 0.80
getMethod · 0.65
setMethod · 0.65
hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected