aboutsummaryrefslogtreecommitdiff
path: root/examples/scene-graph.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-10-03treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practicalAlexander Orzechowski
2023-07-10scene_output: optionally record and report timingsRose Hudson
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-13examples: Drop usage of wlr_output.pendingAlexander Orzechowski
2023-04-14compositor: pass version in wlr_compositor_createSimon Ser
This allows wlroots to support newer versions of the interface without breaking the API.
2022-11-15backend: return wlr_session in wlr_backend_autocreate() callSimon Ser
Up until now, wlr_backend_autocreate() created the wlr_session and then stuffed it into struct wlr_multi_backend so that compositors can grab it later. This is an abuse of wlr_multi_backend and the wlr_backend API: wlr_backend_get_session() and wlr_multi_backend.session only exist to accomodate the needs of wlr_backend_autocreate(). What's more, the DRM and libinput backends don't implement wlr_backend_impl.get_session. Instead, return the struct wlr_session to the compositor in the wlr_backend_autocreate() call. wlr_backend_get_session() will be removed in the next commit.
2022-05-31wlr_scene: Only allow parenting on a wlr_scene_treeAlexander Orzechowski
2022-05-31wlr_scene: Refactor wlr_scene (the root element) to encase a wlr_scene_treeAlexander Orzechowski
Co-authored-by: Isaac Freund <mail@isaacfreund.com>
2022-05-19wlr_scene: Refactor wlr_scene_surface to be a helper on top of wlr_scene_bufferAlexander Orzechowski
2022-05-15xdg-shell: specify version in wlr_xdg_shell_createSimon Ser
With protocol additions such as [1], compositors currently have no way to opt out of the version upgrade. The protocol upgrade will always be backwards-compatible but may require new compositor features. The status quo doesn't make it possible to ship a protocol addition without breaking the wlroots API. This will be an issue for API stabilization [2]. To address this, let compositors provide a maximum version in the function creating the global. We need to support all previous versions of the interface anyways because of older clients. This mechanism works the same way as Wayland clients passing a version in wl_global.bind. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514 [2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3397
2022-01-19scene_graph: Simplify computation for offset of new surfaces.Alexander Orzechowski
This became possible after the usage of wlr_surface_send_frame_done.
2022-01-19scene_graph: remove unused outputs listAlexander Orzechowski
2022-01-19scene_graph: use wlr_scene_output_send_frame_doneAlexander Orzechowski
2022-01-13surface: deprecate wlr_surface.hKirill Primak
2021-11-18examples: init wlr_output with allocator and rendererSimon Zeni
2021-09-08examples/scene-graph: use wlr_scene_outputSimon Ser
This allows us to get damage tracking for freeā„¢.
2021-09-02examples/scene-graph: demonstrate scene_rect node typeDevin J. Pohly
Add RECT nodes to the scene-graph demo to illustrate how they are used. Here, we add a solid rectangle behind each surface as a quick-and-dirty border, handling surface.commit in order to size it appropriately.
2021-08-26examples/scene-graph: new exampleSimon Ser