renderer: test that a frame at the shown size goes through main until the embedder reports its commit; one drop rule

Merged
LA
2d ago
+42-13

Summary

Follow-up to #75 (its independent review, SHIP at 5f97f6389, findings 1 and 2; no behavior change):

  • Test: a frame kept for the embedder at the size the layer already shows, before the embedder reports its commit (setSurfaceOffMain refuses it then), goes through main and shows. It must never be skipped: hostFrame answers SHOWN for it, so nothing else would present it, and its content would wait for the next frame.
  • IOSurfaceLayer.embedderDrops is the one rule that setSurfaceCallback and embedderShowsFrameLocked both use (it was written twice).

Findings 3 (a second Core Animation lock per new-size frame: optional, only if cmux's A/B shows the wait) and 4 (a generation race from before #75, after A->B->A) are not in this PR.

Testing

Scratch branches that only narrow the workflow's test filter to host present: (never merged):

Observed / Not run

  • Observed: the runs above; zig fmt --check and zig ast-check.
  • Not run: nothing else; no cmux pin move is needed for this change.

Changelog

none