aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-09-08scene: add wlr_scene_output_commitSimon Ser
2021-09-08scene: add scene outputsSimon Ser
These allow describing an output's viewport inside the scene-graph.
2021-09-08types: introduce wlr_drm_lease_v1Simon Zeni
2021-09-08backend/drm: introduce wlr_drm_backend_get_non_master_fdSimon Zeni
2021-09-08backend/drm: implement drm lease functionSimon Zeni
2021-09-07backend/drm: drop wlr_drm_connector.desired_modeSimon Ser
Previously used by attempt_enable_needs_modeset, but this has been dropped in the previous commit.
2021-09-07backend/drm: introduce wlr_drm_connector_stateSimon Ser
Previously, we were copying wlr_output_state on the stack and patching it up to be guaranteed to have a proper drmModeModeInfo stored in it (and not a custom mode). Also, we had a bunch of helpers deriving DRM-specific information from the generic wlr_output_state. Copying the wlr_output_state worked fine so far, but with output layers we'll be getting a wl_list in there. An empty wl_list stores two pointers to itself, copying it on the stack blindly results in infinite loops in wl_list_for_each. To fix this, rework our DRM backend to stop copying wlr_output_state, instead add a new struct wlr_drm_connector_state which holds both the wlr_output_state and additional DRM-specific information.
2021-09-07backend/drm: rename enum wlr_drm_connector_state to statusSimon Ser
"state" is easily confused with wlr_output_state.
2021-09-06surface: drop wlr_surface_state.buffer_resourceSimon Ser
Instead, use wlr_surface_state.buffer only.
2021-09-06viewporter: hide wlr_viewportSimon Ser
This is an internal struct.
2021-09-06viewporter: add doc comment explaining compositor requirementsSimon Ser
2021-09-06buffer: make wlr_client_buffer_apply_damage return a boolSimon Ser
We always return the same wlr_client_buffer as the one passed in, so no need to return anything.
2021-09-06buffer: take a wlr_buffer in wlr_client_buffer_apply_damageSimon Ser
Instead of taking a wl_resource as argument, take a wlr_buffer.
2021-09-06surface: move subsurface lists to stateKirill Primak
2021-09-06subsurface: move parent link to stateSimon Ser
Move the wlr_subsurface parent link to the subsurface state. This is a dumb find/replace operation. This shouldn't result in any behavior change.
2021-09-06subsurface: rename wlr_subsurface_state to wlr_subsurface_parent_stateSimon Ser
Add a comment to explain the difference.
2021-09-05keyboard: add wlr_keyboard.keymap_fdSimon Ser
This exposes a read-only FD with the keymap.
2021-09-05util/shm: add allocate_shm_file_pairSimon Ser
This function behaves like allocate_shm_file, except it also returns a read-only FD. This is useful to share the same segment of memory with many Wayland clients.
2021-09-02scene: replace surface_at() with node_at()Devin J. Pohly
With the addition of a non-surface node type, it was unclear how such nodes should interact with scene_node_surface_at(). For example, if the topmost node at the given point is a RECT, should the function treat that node as transparent and continue searching, or as opaque and return (probably) NULL? Instead, replace the function with one returning a scene_node, which will allow for more consistent behavior across different node types. Compositors can downcast scene_surface nodes via the now-public wlr_scene_surface_from_node() if they need access to the surface itself.
2021-09-02scene: add RECT node typeDevin J. Pohly
RECT is a solid-colored rectangle, useful for simple borders or other decoration. This can be rendered directly using the wlr_renderer, without needing to create a surface.
2021-09-02scene: iterate nodes instead of surfaces when renderingDevin J. Pohly
This will allow us to create node types which are rendered but not surface-based, such as a solid color or image.
2021-09-01render/allocator/gbm: fix create() docs for FD ownershipSimon Ser
Fixes: d9d8fc1ab9b7 ("render/allocator: re-open GBM FD")
2021-08-30scene: add node reparent functionDevin J. Pohly
If nodes are arranged in a tree rather than at a single level, then it makes sense that there should be a way to move them to a completely different parent in addition to moving up or down among siblings.
2021-08-26scene: add wlr_scene_node_surface_atSimon Ser
2021-08-26scene: add user data pointer to wlr_scene_nodeSimon Ser
This allows compositors to attach arbitrary data to the scene-graph nodes.
2021-08-26scene: add wlr_scene_node_toggleSimon Ser
This allows compositors to easily enable or disable a scene-graph node. This can be used to show/hide a surface when the xdg_surface is mapped/unmapped.
2021-08-26Introduce new scene-graph APISimon Ser
A new wlr_scene API has been added, following the design ideas from [1]. The new API contains the minimal set of features required to make the API useful. The goal is to design a solid fundation and add more features in the future. [1]: https://github.com/swaywm/wlroots/issues/1826#issuecomment-564601757
2021-08-25backend/drm: introduce wlr_drm_bo_handle_tableSimon Ser
Using GBM to import DRM dumb buffers tends to not work well. By using GBM we're calling some driver-specific functions in Mesa. These functions check whether Mesa can work with the buffer. Sometimes Mesa has requirements which differ from DRM dumb buffers and the GBM import will fail (e.g. on amdgpu). Instead, drop GBM and use drmPrimeFDToHandle directly. But there's a twist: BO handles are not ref'counted by the kernel and need to be ref'counted in user-space [1]. libdrm usually performs this bookkeeping and is used under-the-hood by Mesa. We can't re-use libdrm for this task without using driver-specific APIs. So let's just re-implement the ref'counting logic in wlroots. The wlroots implementation is inspired from amdgpu's in libdrm [2]. Closes: https://github.com/swaywm/wlroots/issues/2916 [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110 [2]: https://gitlab.freedesktop.org/mesa/drm/-/blob/1a4c0ec9aea13211997f982715fe5ffcf19dd067/amdgpu/handle_table.c
2021-08-25Move allocator stuff into new directorySimon Ser
Add render/allocator/ and include/render/allocator/ to hold everything allocator-related.
2021-08-25backend/{drm,libinput}: exclude headers when disabledSimon Ser
2021-08-24util/box: introduce wlr_fbox_transform()Kirill Primak
A floating-point version of wlr_box_transform().
2021-08-20xwayland: Allow to retrieve _NET_STARTUP_IDGuido Günther
This is use for startup notifications per startup-notifiation spec https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
2021-08-18backend/drm: add support for FB_DAMAGE_CLIPSSimon Ser
This allows the kernel to access our buffer damage. Some drivers can take advantage of this, e.g. for PSR2 panels (Panel Self Refresh) or for transfer over USB. Closes: https://github.com/swaywm/wlroots/issues/1267
2021-08-17backend/drm: use addon for wlr_drm_fbSimon Ser
2021-08-14layer-shell: replace close() with destroy()Isaac Freund
The protocol specifies that all requests (aside from destroy) are ignored after the compositor sends the closed event. Therefore, destroying the wlroots object and rendering the resource inert when sending the closed event keeps things simpler for wlroots and compositors.
2021-08-12render/gles2: make wlr_gles2_texture a wlr_buffer addonSimon Ser
2021-08-12render/gles2: make wlr_gles2_buffer an addonSimon Ser
Saves us from walking a list.
2021-08-12buffer: add addon setSimon Ser
This allows wlr_buffer users to extend it with tjeir own state.
2021-08-11surface: kill wlr_surface.previousSimon Ser
This wlr_surface_state field was a special case because we don't want to save the whole current state: for instance, the wlr_buffer must not be saved or else wouldn't get released soon enough. Let's just inline the state fields we need instead.
2021-08-11util/addon: find both by owner and implKirill Primak
This allows to have multiple addons of different types with the same owner.
2021-08-10wlr_output_layout: use wlr_addonsKirill Primak
2021-08-10wlr_outputs: add wlr_addon_setKirill Primak
2021-08-10util: add wlr_addonKirill Primak
2021-07-30render/gles2: add a few 10-bit and FP16 formatsManuel Stoeckl
The half-float formats depend on GL_OES_texture_half_float_linear, not just the GL_OES_texture_half_float extension, because the latter does not include support for linear magni/minification filters. The new 2101010 and 16161616F formats are only available on little- endian builds, since their gl_types are larger than a byte and thus endianness dependent.
2021-07-30render/gles2: hide shm formats without GL supportManuel Stoeckl
This change introduces a new function to check whether the renderer has the needed GL extensions to read a given pixel format.
2021-07-29output: drop wlr_output_state.buffer_typeSimon Ser
This is now unconditionally set to WLR_OUTPUT_STATE_BUFFER_SCANOUT.
2021-07-29output-damage: stop using enum wlr_output_state_buffer_typeSimon Ser
This enum will get dropped in the next commit.
2021-07-29output: drop wlr_output_impl.{attach,rollback}_renderSimon Ser
No backend uses these anymore.
2021-07-28backend/drm: stop initializing renderer for parent backendSimon Ser
Unless we're dealing with a multi-GPU setup and the backend being initialized is secondary, we don't need a renderer nor an allocator. Stop initializing these.
2021-07-28backend/drm: drop get_renderer implementationSimon Ser
We can now just rely on the common code for this.