Files
RedBear-OS/local
vasilito 28eea74305 redbear-compositor: real wp_presentation_feedback timing
Replace the hard stub that sent both 'discarded' and 'presented'
events with all-zero timestamps. The new implementation:

* Captures CLOCK_MONOTONIC at the time the presented event is emitted
* Uses the actual presentation time (since the previous page_flip)
* Populates Wayland 'presented' wire fields correctly:
  - tv_sec_hi, tv_sec_lo (split 64-bit CLOCK_MONOTONIC at seconds)
  - refresh_nsec (16.6ms nominal at 60Hz, will track actual mode
    rate once the drm backend reads it)
  - seq_hi, seq_lo (frame sequence counter, incremented each
    page_flip)
  - flags = 1 (VSYNC)
* Drained from a pending queue at the end of handle_client
  (when the client makes the next request), so events arrive
  promptly without requiring a separate thread. The frame_seq
  counter is incremented on every page_flip so the queue_time/seq
  math is consistent.

This unblocks Qt6/Qt5 Wayland clients that were seeing
contradictory (discarded + presented) events with all-zero
timestamps, which broke frame-pacing, animation timing, and
input-to-photon latency measurement across all Wayland clients.

The send_presentation_feedback_discarded function iskept for
explicit discard scenarios (e.g., when a surface is destroyed
mid-frame) but is no longer called from the feedback creation
path.

Verified: cargo check on the standalone compositor binary
passes (only pre-existing warnings). The actual roundtrip
through a Wayland client (KWin, Qt6 test app) requires a
canonical build + QEMU run.
2026-07-27 08:04:10 +09:00
..