aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-12-14util/global: remove wl_display arg from wlr_global_destroy_safeSimon Ser
Since [1], we can get the wl_display directly from the wl_global. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/commit/2b22160fb690a76247aa9bd0be3069ff43e8239f
2021-12-14xdg-activation: Allow to submit tokensGuido Günther
Allows the compositor to submit tokens to the pool of currently active tokens. This can be useful when the launcher doesn't use or support xdg-activation-v1 by itself - e.g. when it is X11 based or use gtk_shell1.
2021-12-13scene: fix wlr_scene_send_frame_done() APIIsaac Freund
This doesn't work if scene outputs are not used as the primary output of scene surfaces will always be NULL. Therefore, take a wlr_scene_output instead of separate wlr_scene and wlr_output arguments and rename the function to wlr_scene_output_send_frame_done(). The actual behavior of the function is unchanged.
2021-12-13scene: add wlr_scene_send_frame_done()Isaac Freund
2021-12-13scene: add primary output to wlr_scene_surfaceIsaac Freund
This allows compositors to avoid sending multiple frame done events to a surface that is rendered on multiple outputs at once. This may also be used in the same way for presentation feedback.
2021-12-13scene: send surface enter/leave output eventsIsaac Freund
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-12-13backend/drm: add wlr_drm_backend_monitorChris Chamberlain
This helper is responsible for listening for new DRM devices and create new child DRM backends as necessary.
2021-12-09subsurface: don't add to parent list immediatelyKirill Primak
2021-12-09surface: fix non-buffer damage handlingKirill Primak
This commit fixes the way the damage that doesn't come directly from the client is handled.
2021-12-09output: introduce wlr_output_set_nameSimon Ser
wlroots picks names for all outputs, but it might be desirable for compositor to override it. For instance, Sway will use a headless output as a fallback in case no outputs are connected. Sway wants to clearly label the fallback output as such and label "real" headless outputs starting from HEADLESS-1.
2021-12-07linux-dmabuf-v1: add per-surface feedbackSimon Ser
2021-12-07linux-dmabuf-v1: implement v4Simon Ser
Implement a basic version of linux-dmabuf-unstable-v1 version 4. Only default hints are implemented. The new wlr_linux_dmabuf_feedback_v1 data structure will allow compositors to define their own custom hints in the future. This data structure makes it easy to describe feedback metadata. It's converted to a "compiled" form suitable for marshalling over the Wayland socket via feedback_compile.
2021-12-07render: add wlr_renderer_init_wl_shmSimon Ser
This allows compositors to initialize wl_shm without initializing other globals like linux-dmabuf.
2021-12-03output: drop front_bufferSimon Ser
This lets backends immediately release committed buffers if they want to.
2021-12-03output: add wlr_output_event_commit.bufferSimon Ser
This allows output commit listeners to access the newly committed buffer. Currently wlr_output.front_buffer is used but it'll get removed in the next commit.
2021-12-03render/drm-format-set: add wlr_drm_format_set_intersectSimon Ser
This intersects two DRM format sets. This is useful for implementing DMA-BUF feedback in compositors, see e.g. the Sway PR [1]. [1]: https://github.com/swaywm/sway/pull/6313
2021-12-02render/egl: improve modifier support detectionSimon Ser
Support for EXT_image_dma_buf_import_modifiers doesn't necessarily indicate support for modifiers. For instance, Mesa will advertise EXT_image_dma_buf_import_modifiers for all drivers. This is a trick to allow EGL clients to enumerate supported formats (something EXT_image_dma_buf_import is missing). For more information, see [1]. Add a new wlr_egl.has_modifiers flag which indicates whether modifiers are supported. It's set to true if any eglQueryDmaBufModifiersEXT query returned a non-empty list. Use that flag to figure out whether the buffer modifier should be passed to the EGL implementation on import. [1]: https://github.com/KhronosGroup/EGL-Registry/issues/142
2021-12-01render/egl: add wlr_egl_create_with_contextSimon Ser
This allows creating a wlr_egl from an already-existing EGL display and context. This is useful to allow compositors to choose the exact EGL initialization parameters.
2021-12-01render/egl: store IMG_context_priority in wlr_eglSimon Ser
The next commit will split extension lookup and context initialization.
2021-11-30scene: add wlr_scene_get_scene_outputSimon Ser
This allows getting a wlr_scene_output from a wlr_output. Since an output can only be added once to a scene-graph there's no ambiguity. This is useful for compositors using wlr_scene_attach_output_layout: the output layout integration automatically creates a scene-graph output for each wlr_output added to the layout.
2021-11-30output: add wlr_output_get_primary_formatsSimon Ser
This allows compositors to get primary formats without manually calling wlr_output_impl.get_primary_formats. For example, the Sway patch for linux-dmabuf feedback [1] needs this. [1]: https://github.com/swaywm/sway/pull/6313
2021-11-30output: fix typo in wlr_output_impl.get_primary_formats docsSimon Ser
The buffer capabilities indicate whether the formats returned are for DMA-BUFs or shared memory buffers.
2021-11-26render: add DMA-BUF docsSimon Ser
Document some of the assumptions for DMA-BUF buffer sharing and modifiers.
2021-11-26render/drm_format_set: add wlr_drm_format_hasSimon Ser
2021-11-25scene: add wlr_scene_xdg_surface_createSimon Ser
This allows compositors to easily add an xdg_surface to the scene-graph while retaining the ability to unconstraint popups and decide their final position. Compositors can handle new popups with the wlr_xdg_shell.new_surface event, get the parent scene-graph node via wlr_xdg_popup.parent.data, create a new scene-graph node via wlr_scene_xdg_surface_tree_create, and unconstraint the popup if they want to.
2021-11-25backend: remove noop backendSimon Zeni
2021-11-25backend/headless: drop wlr_headless_backend_create_with_rendererSimon Ser
The headless backend no longer needs a parent renderer: it no longer needs to return it in wlr_backend_impl.get_renderer, nor does it need to return its DRM FD in wlr_backend_impl.get_drm_fd. Drop this function altogether since it now behaves exactly like wlr_headless_backend_create.
2021-11-25backend/headless: stop picking a DRM FDSimon Ser
Sometimes the headless backend is used standalone with the Pixman renderer, sometimes it's used together with another backend which has already picked a DRM FD. In both of these cases it doesn't make sense to pick a DRM FD. Broadly speaking the headless backend doesn't really care which DRM device is used for the buffers it receives. So it doesn't really make sense to tie it to a particular DRM device. Let the backend users (e.g. wlr_renderer_autocreate) open an arbitrary DRM FD as needed instead.
2021-11-23input-device: remove wlr_input_device.linkSimon Ser
This field's ownership is unclear: it's in wlr_input_device, but it's not managed by the common code, it's up to each individual backend to use it and clean it up. Since this is a backend implementation detail, move it to the backend-specific structs.
2021-11-22backend/wayland: report parent presentation clockSimon Ser
There's no guarantee that the parent Wayland compositor uses CLOCK_MONOTONIC for reporting presentation timestamps, they could be using e.g. CLOCK_MONOTONIC_RAW or another system-specific clock. Forward the value via wlr_backend_impl.get_presentation_clock. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3254#note_1143061
2021-11-22linux-dmabuf-v1: hide wlr_linux_buffer_params_v1Simon Ser
The parameters are used when the client is in the process of building a buffer. There's no reason why this internal implementation detail should be exposed in our public header.
2021-11-19backend/drm: scan leases on ueventSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3181
2021-11-19drm-lease-v1: listen to lease destroy eventSimon Ser
2021-11-19backend/drm: introduce wlr_drm_leaseSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3183
2021-11-19Introduce WLR_DEVICE_LEASE eventsSimon Ser
This will allow the DRM backend to reload its lessee list.
2021-11-19output: Add function to set preferred render formatManuel Stoeckl
This change introduces new double buffered state to the wlr_output, corresponding to the buffer format to render to. The format being rendered to does not control the bit depth of colors being sent to the display; it does generally determine the format with which screenshot data is provided. The DRM backend _may_ sent higher bit depths if the render format depth is increased, but hardware and other limitations may apply.
2021-11-19output: lift up output format fallback logicManuel Stoeckl
This makes it possible for the two functions using output_pick_format (output_pick_cursor_format and output_create_swapchain) to select different buffer formats.
2021-11-18backend: remove wlr_backend_get_rendererSimon Zeni
2021-11-18backend/headless: don't store the parent rendererSimon Zeni
2021-11-18backend: remove backend_get_allocatorSimon Zeni
2021-11-18output: add wlr_output_init_renderSimon Ser
Co-authored-by: Simon Zeni <simon@bl4ckb0ne.ca>
2021-11-17Improve wlr_drm_format documentationDemi Marie Obenour
A wlroots user can easily get confused and think that `cap` refers to wlroots buffer capabilities, not array capacity.
2021-11-17Remove support for DMA-BUF flagsSimon Ser
They are never used in practice, which makes all of our flag handling effectively dead code. Also, APIs such as KMS don't provide a good way to deal with the flags. Let's just fail the DMA-BUF import when clients provide flags.
2021-11-09render/allocator: make wlr_allocator part of the public APISimon Zeni
2021-11-08text-input: fix type of send_preedit_string() argsIsaac Freund
The protocol uses a signed integer here, which is also what the wlr_input_method_v2_preedit_string struct provides to compositors from the input method protocol. Sway currently just passes those int32_t values directly to this function leading to an implicit conversion.
2021-11-08output: drop wlr_output_export_dmabufSimon Ser
Callers can access output->front_buffer instead.
2021-11-02backend/drm: handle per-connector hotplug eventsSimon Ser
When a connector ID is specified in a hotplug event, don't scan all connectors. Only scan the connector that has changed.
2021-11-02backend/session: introduce wlr_device_change_eventSimon Ser
This struct contains additional information for session device change events, such as the DRM connector ID that has changed.
2021-11-02xwayland: add support for -noTouchPointerEmulationSimon Ser
This allows compositors to handle touch pointer emulation manually, instead of having Xwayland do it [1]. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/691
2021-10-31backend/wayland: use xdga client activationRonan Pigott