diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 14:14:28 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 14:14:28 +0300 |
| commit | 339e1ad7adb8340732ee856d0f6f0d2c7f1455d1 (patch) | |
| tree | 55d2735987f240e5eaacf6581ed3ce5db2c0e3a8 /src/platform/wayland/buffer.c | |
| parent | e185a9d719d469a0fd7edcf09a6342f7b10cbb8e (diff) | |
Inline trivial internal helpers at their call sites
Diffstat (limited to 'src/platform/wayland/buffer.c')
| -rw-r--r-- | src/platform/wayland/buffer.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/platform/wayland/buffer.c b/src/platform/wayland/buffer.c index 142f85f..f4243d1 100644 --- a/src/platform/wayland/buffer.c +++ b/src/platform/wayland/buffer.c @@ -26,11 +26,6 @@ int device_px(int logical, uint32_t scale_120) return px > 0 && px <= INT_MAX ? (int)px : -1; } -int logical_px_ceil(int device, uint32_t scale_120) -{ - return (int)(((int64_t)device * YASL_SCALE_UNIT + scale_120 - 1) / scale_120); -} - bool buffer_size(int width, int height, size_t *bytes) { if (width <= 0 || height <= 0 || width > INT32_MAX / 4 || @@ -206,7 +201,9 @@ void surface_follow_outputs(struct wayland_surface *w) { uint32_t refresh = 0; int32_t max_scale = 0; - bool need_scale = !w->frac_scale && !surface_gets_preferred_scale(w->surface); + bool need_scale = !w->frac_scale && + wl_proxy_get_version((struct wl_proxy *)w->surface) < + WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION; for (const struct wl_conn_output *o = w->conn->outputs; o; o = o->next) { if (o->mask & w->outputs) { @@ -564,8 +561,3 @@ struct yasl_timing wayland_surface_timing(const struct wayland_surface *w) yasl_clock_resize_stats(&w->clock, &t.resize); return t; } - -uint64_t wayland_surface_frame_time_ns(struct wayland_surface *w, uint64_t now) -{ - return yasl_clock_frame_timestamp_ns(&w->clock, now); -} |
