compositor: add wlr_surface_synced
TODO:
-
Error handling -
Docs -
init/merge/finish for non-trivial states -
I don't like these void *
, maybe it'd be worth having an emptystruct wlr_surface_synced_state
? -
Maybe should havedestroy
inwlr_surface_synced_synced_impl
, to replacewlr_addon
for this specific use-case? -
Maybe should init/finish current/pending, instead of leaving it up to the caller
The upside of this solution is that most synced states are trivial and thus only need 2 lines of code to add support for. Also, state access is a fast array access and we could use a single allocation for all state data if we wanted to: !4495. The downside is that we're storing void *
pointers and this might be micro-optimization.
Alternative to !3151 (closed)
Breaking change: wlr_tearing_control_v1.hint
has been renamed to current
, and its type changed from uint32_t
to enum wp_tearing_control_v1_presentation_hint
.
Edited by Simon Ser