aboutsummaryrefslogtreecommitdiff
path: root/examples/output-layers.c
AgeCommit message (Collapse)Author
2024-02-15Define _POSIX_C_SOURCE globallySimon Ser
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead, require POSIX.1-2008 globally. A lot of core source files depend on that already. Some care must be taken on a few select files where we need a bit more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and some files need BSD extensions (_DEFAULT_SOURCE). In both cases, these feature test macros imply _POSIX_C_SOURCE. Make sure to not define both these macros and _POSIX_C_SOURCE explicitly to avoid POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001 but _XOPEN_SOURCE says POSIX.1-2008). Additionally, there is one special case in render/vulkan/vulkan.c. That file needs major()/minor(), and these are system-specific. On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need to make sure it's not defined for this file. On Linux, we can explicitly include <sys/sysmacros.h> and ensure that apart from symbols defined there the file only uses POSIX toys.
2024-01-25backend: take wl_event_loop instead of wl_display in wlr_backend_autocreate()Simon Ser
2023-11-23output: take wl_display in wlr_output_create_global()Simon Ser
Currently wlr_output holds a wl_display, but it will go away soon. Instead of relying on that field in wlr_output_create_global(), make the dependency explicit by taking a wl_display as argument.
2023-06-27examples: enable new outputsSimon Ser
2023-06-23output: add wlr_output_state_init()Simon Ser
This changes the semantics of wlr_output_state. Instead of having fields with uninitialized memory when missing from the committed bitflag, all fields are always initialized (and maybe NULL/empty), just like we do in wlr_surface_state. This reduces the chances of footguns when reading a field, and removes the need to check for the committed bitfield everywhere. A new wlr_output_state_init() function takes care of initializing the Pixman region.
2023-06-13output: add wlr_output_state_set_layers()Simon Ser
2023-06-13examples: Drop usage of wlr_output.pendingAlexander Orzechowski
2023-06-12examples/output-layers: fix layers not included in commitSimon Ser
wlr_output_set_layers() attaches layers to the output's pending state, but then uses a detached wlr_output_state in wlr_output_state_commit(). This results in layers being left out of the committed state. Fixes: 8e81b4bb4237 ("examples: convert to new rendering API")
2023-06-05add render timer APIRose Hudson
Based on five calls: wlr_render_timer_create - creates a timer which can be reused across frames on the same renderer wlr_renderer_begin_buffer_pass - now takes a timer so that backends can record when the rendering starts and finishes wlr_render_timer_get_time - should be called as late as possible so that queries can make their way back from the GPU wlr_render_timer_destroy - self-explanatory The timer is exposed as an opaque `struct wlr_render_timer` so that backends can store whatever they want in there.
2023-05-30examples: convert to new rendering APISimon Ser
Left out multi-pointer (will be removed) and quads (requires arbitrary rotation).
2023-04-14compositor: pass version in wlr_compositor_createSimon Ser
This allows wlroots to support newer versions of the interface without breaking the API.
2023-04-04output-layer: add support for scaling buffersSimon Ser
This allows callers to set a destination size different from the buffer size to scale them. The DRM backend supports this. The Wayland backend doesn't yet (we'd need to wire up viewporter).
2023-02-20examples/output-layers: relay feedback eventsSimon Ser
2023-02-20examples/output-layers: new exampleSimon Ser