aboutsummaryrefslogtreecommitdiff
path: root/include/backend
AgeCommit message (Collapse)Author
2024-01-25backend/wayland: take wl_event_loop instead of wl_displaySimon Ser
2024-01-25backend/libinput: drop wl_display argumentSimon Ser
We can grab the event loop from the wlr_session instead.
2024-01-25backend/headless: take wl_event_loop instead of wl_displaySimon Ser
2024-01-23backend/wayland: populate pointer axis relative directionSimon Ser
2023-12-30backend/drm: save current refresh rateSimon Ser
wlr_output.refresh is populated by core wlr_output, and thus will be zero for a custom mode with an unset refresh rate. Save the refresh rate from the drmModeModeInfo in wlr_drm_connector instead. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3791
2023-11-30backend/drm: remove wlr_drm_renderer.backendSimon Ser
This is unused.
2023-11-30backend/drm: move drm_plane_finish_surface() to drm.cSimon Ser
This function touches queued_fb/current_fb, which the renderer has nothing to do with.
2023-11-30backend/drm: split wlr_drm_fb related functions into separate fileSimon Ser
2023-11-27backend/x11: don't send ConfigureRequest with the same sizeKirill Primak
Under X11, ConfigureNotify means that the window has already been resized. Sending ConfigureRequest with the received size is not only useless, but also can confuse the window manager, which will probably reply with the current (i.e. *old*) size causing a configure loop. Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3769
2023-11-23backend/session: take wl_event_loop instead of wl_displaySimon Ser
wl_display holds a lot more than wlr_session needs: wlr_session only needs to wait for a FD to become readable, but wl_display provides full access to the Wayland client and protocol objects. Switch to wl_event_loop to better reflect the above.
2023-11-19backend/drm: add wlr_drm_connector_state.nonblockSimon Ser
Instead of having this condition checked in multiple places, centralize it so that they don't go out-of-sync.
2023-11-17backend/drm: Destroy page flips on backend destroyAlexander Orzechowski
When we destroy the backend, page flips will no longer be invoked meaning those won't clean up the page flips for us.
2023-11-17backend/drm: Track page flips in listAlexander Orzechowski
2023-11-17backend/drm: introduce page-flip tracking structSimon Ser
Introduce a per-page-flip tracking struct passed to the kernel when we request a page-flip event for an atomic commit. The kernel will pass us back this pointer when delivering the event. This eliminates any risk of mixing up events together. In particular, if two events are pending, or if the CRTC of a connector is swapped, we no longer blow up in the page-flip event handler. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3753
2023-10-30backend: drop wlr_backend_get_presentation_clock()Simon Ser
We can just assume CLOCK_MONOTONIC everywhere. Simplifies the backend API, and fixes clock mismatches when multiple backends are used together with different clocks.
2023-10-02docs: replace the less commonly used "::" with "."Kirill Primak
2023-09-28backend/drm: Add async page flip support to legacyvaxerski
Atomic doesn't support such flags yet.
2023-08-16backend/wayland: wait for xdg_surface.configure explicitlySimon Ser
We were assuming a roundtrip was enough to get an xdg_surface.configure event. That's not the case, the protocol spec doesn't make such a guarantee.
2023-08-16backend/wayland: add wlr_wl_output_create_from_surface()Simon Ser
By using this function, a compositor can display a wlroots compositor in a sub-surface, for instance.
2023-08-16backend/wayland: tag wl_surfaceSimon Ser
When integrating wlroots with another toolkit, wlroots may receive wl_pointer.enter events for surfaces not backed by a wlr_output. Ignore such surfaces by tagging the ones we're aware of with wl_proxy_set_tag().
2023-08-16backend/wayland: take existing wl_display in wlr_wl_backend_create()Simon Ser
This allows compositors to use an existing wl_display, to integrate wlroots with an existing toolkit.
2023-06-30backend/drm: handle output layer damageSimon Ser
2023-06-12backend/drm: clip FB damageSimon Ser
The kernel complains when the damage exceeds the FB bounds: [73850.448326] i915 0000:00:02.0: [drm:drm_atomic_check_only] [PLANE:31:plane 1A] invalid damage clip 0 0 2147483647 2147483647 Make the DRM backend behave like the Wayland one and allow compositors to damage (0, 0, INT32_MAX, INT32_MAX) to repaint everything without needing to know the exact buffer size. Closes: https://github.com/swaywm/sway/issues/7632
2023-06-05Add some missing includes/declarationsKirill Primak
2023-06-05backend/wayland: add scaling support for output layersSimon Ser
Use the viewporter protocol to scale output layers.
2023-05-11wlr_drm_format: Rework wlr_drm_format_intersectAlexander Orzechowski
Now it takes a reference to a destination format
2023-03-28backend/wayland: only unmap layers when necessarySimon Ser
2023-03-24backend/wayland: support touch cancel eventsRose Hudson
since wayland doesn't provide a touch id in cancel events, track what points are active so we can cancel all of them timestamp is also not provided - use 0 because no one's paying attention to that anyway Closes #3000
2023-02-28backend/drm: use libdisplay-info for CVT mode generationSimon Ser
2023-02-28backend/drm: use libdisplay-info to parse EDIDSimon Ser
2023-02-21backend/drm: drop wlr_drm_layer.pending_{width,height}Simon Ser
No need to store this info in struct wlr_drm_layer. We can just extract the size when we need it.
2023-02-20backend/drm: send output layer feedback eventsSimon Ser
2023-02-20backend/drm: add support for output layersSimon Ser
2023-02-20backend/drm: add libliftoff composition layerSimon Ser
This will be useful for implementing the output layers API.
2023-02-20backend/drm: add libliftoff interfaceSimon Ser
2023-02-20backend/drm: init wlr_drm_plane for all plane typesSimon Ser
2023-02-20backend/wayland: implement output layersSimon Ser
2023-02-02backend/wayland: handle wl_registry.global_remove for wl_seatSimon Ser
Destroy the struct wlr_wl_seat when the global is removed.
2023-02-02backend/wayland: make destroy_wl_seats() handle a single seatSimon Ser
Instead of destroying all seats, destroy a single one. We only need to destroy all seats at one call-site (backend_destroy), but we'll need to destroy a single seat elsewhere in the next commit.
2023-01-31backend/drm: set "max bpc" property based on pixel formatSimon Ser
Since 1d581656c756 ("backend/drm: set "max bpc" to the max") we set the "max bpc" property to the maximum value. The kernel driver is supposed to clamp this value depending on hardware capabilities. All kernel drivers lower the value depending on the GPU capabilities. However, none of the drivers lower the value depending on the DP-MST link capabilities. Thus, enabling a 4k@60Hz mode can fail on some DP-MST setups due to the "max bpc" property. Additionally, it's not a good idea to unconditionally set "max bpc" to the max. A high bpc consumes more lanes and more clock speed, which means higher power consumption and the busy lanes cannot be used for something else (e.g. other data transfers on a USB-C cable). For now, let's tie the "max bpc" to the pixel format of the buffer. Introduce a heuristic to make "high bit-depth buffer" a synonym of "I want the best quality". This is not perfect: a "max bpc" higher than 8 might be desirable for pixel formats with a color depth of 8 bits, for instance when the color management KMS properties are used. But we don't really support that yet, so let's leave this for later. Closes: https://github.com/swaywm/sway/issues/7367
2022-12-15backend/drm: remove wlr_drm_crtc.legacy_crtcSimon Ser
We only need it for one thing: gamma size. Moreover, some bits in the drmModeCrtc will become out-of-date, for instance the current mode, so let's avoid caching the whole struct and only keep what we know won't change.
2022-12-13backend/drm: rename wlr_drm_backend.outputs to connectorsSimon Ser
This list contains wlr_drm_connector entries, and there is no guarantee that the wlr_output fields are initialized.
2022-12-13backend/drm: add drm_connector_status_str()Simon Ser
Helper to stringify a connector status.
2022-12-07backend/drm: store pending FB in stateSimon Ser
Instead of having a pending_fb field on the struct wlr_drm_plane, move it to struct wlr_drm_connector_state. That way, there's no risk having a stale pending FB around: the state doesn't survive across tests and commits. The cursor is a special case because it's disconnected from the atomic state: the wlr_backend_impl.set_cursor hook sets the cursor for the next commit. Move the field to wlr_drm_connector.cursor_pending_fb.
2022-12-07backend/drm: use separate field to store pending cursor FBSimon Ser
We'll move the pending primary FB into the connector state in the next commit, dropping wlr_drm_plane.pending_fb in the process. Introduce a dedicated field for the cursor, which has to be managed in a special way due to our set_cursor API.
2022-12-06build: unify naming for HAVE_* definesSimon Ser
We sometimes used HAS_, sometimes polluted the LIBINPUT_ namespace, etc.
2022-12-06backend/libinput: use internal_configSimon Ser
Removes project arguments.
2022-12-06build: use a configuration file for internal featuresSimon Ser
This avoids re-building the whole project when switching one Meson option. This shrinks down the compiler invocation command line, making it more readable and making it easier to inspect which flags are passed in (the generated file can be opened). Additionally this is more consistent with our external feature handling, which uses <wlr/config.h> already.
2022-12-06backend/x11: ensure buffers are released on shutdownSimon Ser
2022-11-15backend: drop wlr_backend_get_session()Simon Ser
This no longer has purpose.