diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:19:58 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-15 13:19:58 +0300 |
| commit | 3d012d707d0242780cd386868ab511846dc9b0af (patch) | |
| tree | 131e1621f400f78cba1541f2fbf9591ffcb4ce08 /src/platform/wayland | |
| parent | 8d9ee60888e01e5d88c306afe0c77bad02a29e5b (diff) | |
Add damage presentation and reduce CPU surface latency
Add yasl_cpu_present_damage to submit partial damage rectangles.
Skip commit timers for CPU surfaces to prevent display delay.
Remove frame callback gating in surface_draw_frame when free buffers exist.
Flush the display immediately on CPU present.
Forward tearing option to window specifications.
Diffstat (limited to 'src/platform/wayland')
| -rw-r--r-- | src/platform/wayland/buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/wayland/buffer.c b/src/platform/wayland/buffer.c index b68621d..7ff4bd0 100644 --- a/src/platform/wayland/buffer.c +++ b/src/platform/wayland/buffer.c @@ -497,7 +497,7 @@ static void commit_buffer(struct wayland_surface *w, int idx) wp_fifo_v1_wait_barrier(w->fifo); wp_fifo_v1_set_barrier(w->fifo); } - if (w->commit_timer && w->conn->pres_clock_known) { + if (w->commit_timer && w->conn->pres_clock_known && w->base.presenter != YASL_PRIVATE_PRESENTER_CPU) { uint64_t now = yasl_private_loop_now_ns(); uint64_t next = yasl_private_clock_next_present_ns(&w->clock); bool soon = next > now && next - now < (uint64_t)(w->clock.refresh_ns * 1.5); @@ -558,7 +558,7 @@ void surface_draw_frame(struct wayland_surface *w) surface_fail(w); return; } - if (w->closed || !w->cbs->draw || w->frame_cb || !w->want_draw) + if (w->closed || !w->cbs->draw || !w->want_draw) return; int idx = buffer_pick_free_index(w->buffers, w->cur); |
