This commit is contained in:
Kenny Levinsen 2026-04-13 07:37:40 +07:00 committed by GitHub
commit 91d2d206bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 141 additions and 44 deletions

View file

@ -291,7 +291,7 @@ struct output_config {
enum scale_filter_mode scale_filter;
int32_t transform;
enum wl_output_subpixel subpixel;
int max_render_time; // In milliseconds
int max_render_time; // In milliseconds, -2 means auto
int adaptive_sync;
enum render_bit_depth render_bit_depth;
enum color_profile color_profile;

View file

@ -5,6 +5,7 @@
#include <wayland-server-core.h>
#include <wlr/types/wlr_damage_ring.h>
#include <wlr/types/wlr_output.h>
#include <wlr/render/drm_syncobj.h>
#include <wlr/types/wlr_scene.h>
#include "config.h"
#include "sway/tree/node.h"
@ -67,9 +68,15 @@ struct sway_output {
struct timespec last_presentation;
uint32_t refresh_nsec;
int max_render_time; // In milliseconds
int64_t max_render_time_ns;
struct wl_event_source *repaint_timer;
bool adaptive_render_time;
struct timespec render_start;
struct wlr_drm_syncobj_timeline_waiter render_waiter;
bool render_waiter_active;
int64_t render_ema_ns;
bool allow_tearing;
bool hdr;
};