feat: report on-screen cursor position in producer contract

Append cursor_seq/cursor_visible/cursor_pos to the producer block
(host-RO ABI; offsets 168/172/176, existing layout unchanged). Position
is reported every pump tick, independent of draw_cursor, so a consumer
can overlay its own cursor even when the producer does not composite it.

x and y pack into one 8-aligned 64-bit field (single atomic store, no
tear); cursor_seq bumps last to gate a consistent read. Adds the
vgpu_publish_cursor() engine setter and a lightweight cursor_sample_pos()
(position/visibility only, no shape extract) called from the pump.
This commit is contained in:
2026-06-18 22:06:55 +03:00
parent 9f1b41cf78
commit 977c056287
6 changed files with 52 additions and 0 deletions
+4
View File
@@ -10,6 +10,10 @@
* Returns 1 if anything changed since last sample, else 0. */
int cursor_sample(vgpu_ctx* ctx);
/* Sample only cursor position/visibility (no shape extract). Updates
* ctx->cursor.{visible,x,y}. Cheap (one GetCursorInfo); safe to call every pump tick. */
void cursor_sample_pos(vgpu_ctx* ctx);
/* Alpha/AND-XOR compose the sampled cursor onto a tight BGRA frame. */
void cursor_draw(vgpu_ctx* ctx, uint8_t* bgra, uint32_t width, uint32_t height);