aboutsummaryrefslogtreecommitdiff
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-08scene: fix wlr_scene_render_output offsetSimon Ser
When providing non-zero layout-local coordinates to wlr_scene_render_output, the viewport should be translated by the given values. However the viewport was translated by the opposite values: when giving 42,42 the viewport's position would be set to -42,-42.
2021-09-08types: introduce wlr_drm_lease_v1Simon Zeni
2021-09-08protocol/meson: bump wayland-protocols requirement to 1.22Simon 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: drop attempt_enable_needs_modesetSimon Ser
Modesets require a buffer. The DRM backend tried to auto-enable outputs when a CRTC becomes available in the past, but now that fails because no buffer is available. Instead of having this magic inside the DRM backend, a better approach is to do it in the compositor or in an optional helper.
2021-09-07output-damage: fix damage on modesetSimon Ser
On modeset wlr_output will internally allocate a buffer. The backend will emit a "mode" output event, then wlr_output will emit a "commit" event. wlr_output_damage handles the "mode" event by damaging the whole output, and then handles the "commit" event. However the commit event has a buffer, so wlr_output_damage rotates the damage in its ring buffer, thinking the compositor has rendered a frame. The compositor hasn't rendered a frame, what wlr_output_damage sees is the internal wlr_output black buffer used for the modeset. Let's fix this by damaging the whole output in the "commit" event handler if the mode has changed. Additionally, damage the whole output after rotating the damage ring buffer.
2021-09-07backend: wait for session to become activemuradm
2021-09-07backend/drm: drop drm_connector_init_rendererSimon Ser
drm_connector_set_pending_fb already takes care of this.
2021-09-07backend/drm: drop unused arg from get_possible_crtcsSimon Ser
Constify drmModeConnector while at it.
2021-09-07backend/drm: fix crash on VT switchSimon Ser
Don't set the MODE flag when disabling a CRTC. This fixes a NULL pointer dereference in drm_connector_state_init.
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-07surface: fix abort on NULL buffer attachSimon Ser
Fixes: ba0525c5c08b ("surface: drop wlr_surface_state.buffer_resource") Closes: https://github.com/swaywm/wlroots/issues/3173
2021-09-06surface: drop wlr_surface_state.buffer_resourceSimon Ser
Instead, use wlr_surface_state.buffer only.
2021-09-06surface: ensure buffer is reset to NULL in surface_state_moveSimon Ser
When surface_state_move processes a NULL commit, make sure to reset state->buffer to NULL instead of leaving behind an old wlr_buffer.
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: inline surface_commit_pending()Kirill Primak
2021-09-06surface: change surface_finalize_state() to surface_finalize_pending()Kirill Primak
2021-09-06surface: rename impl and its functionsKirill Primak
This makes the naming consistent with other resource implementations.
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-06surface: cache frame callback lists againKirill Primak
Caching frame callback lists is actually the correct behavior, because if a surface is locked because of e.g. subsurface synchronization, clients would expect to receive frame done events only after the pending state is actually committed.
2021-09-05seat: avoid copying the keymap for each clientSimon Ser
We can just send a read-only file descriptor instead.
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-03render/allocator/gbm: add log message for gbm_bo_get_fd_for_planeSimon Ser
Makes it easier to find out which branch is taken when debugging issues like [1]. [1]: https://github.com/swaywm/wlroots/issues/3156
2021-09-03backend/drm: handle drm_surface_blit errorsSimon Ser
drm_surface_blit returns NULL on error. This can happen e.g. when the source buffer cannot be imported into EGL. Closes: https://github.com/swaywm/wlroots/issues/3154
2021-09-03render/allocator: use legacy authentication for primary nodesSimon Ser
Closes: https://github.com/swaywm/wlroots/issues/3156
2021-09-02scene: remove redundant empty-region check in render_texture()Devin J. Pohly
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-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-02contributing: don't reference issues in commit first lineSimon Ser
Commits named "Fix #XXX" make it pretty complicated to figure out exactly what the commit is doing from the shortlog. A better place for issue references is in the extended commit message.
2021-09-01build: add subproject fallback for wayland-protocolsSimon Ser
Depends on [1]. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/84
2021-09-01build: add subproject fallback for waylandSimon Ser
2021-09-01render/allocator/gbm: fix create() docs for FD ownershipSimon Ser
Fixes: d9d8fc1ab9b7 ("render/allocator: re-open GBM FD")
2021-09-01render/allocator: re-open GBM FDSimon Ser
Using the same DRM file description for the DRM backend and for the GBM allocator will result in GEM handle ref'counting issues [1]. Re-open the DRM FD to fix these issues. [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/110
2021-08-30Link to gamja for web chatSimon Ser
gamja offers a better experience than Kiwi.
2021-08-30scene: stricter assertions on reparentDevin J. Pohly
For consistency with the rest of the scene-graph API, prevent detaching a subtree by giving NULL for the new parent, and don't allow ROOT nodes to be grafted into another tree.
2021-08-30scene: make graph loops fatal when debuggingDevin J. Pohly
2021-08-30scene: ensure node cannot be reparented below itselfDevin J. Pohly