mirror of
https://dev.lirent.ru/Vatrog/vm-vgpu-streamer.git
synced 2026-07-09 01:46:38 +03:00
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:
@@ -53,4 +53,11 @@ void vgpu_bump_run_epoch(const vgpu_region_view* rv);
|
||||
void vgpu_tick_heartbeat(const vgpu_region_view* rv);
|
||||
void vgpu_publish_full_frame_ack(const vgpu_region_view* rv, uint32_t req);
|
||||
|
||||
/* Publish the on-screen cursor position (host-RO). Position is sensor data and is
|
||||
* reported independent of control.draw_cursor (host may draw its own overlay even when the
|
||||
* producer does not composite the cursor). x,y are screen coords (signed; multi-monitor may
|
||||
* be negative); visible!=0 when the cursor is shown. Packs x|y into one 8-aligned 64-bit
|
||||
* field (single atomic store) and bumps cursor_seq last. */
|
||||
void vgpu_publish_cursor(const vgpu_region_view* rv, int32_t x, int32_t y, uint32_t visible);
|
||||
|
||||
#endif /* VGPU_STREAM_ENGINE_H */
|
||||
|
||||
Reference in New Issue
Block a user