aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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: drop surface_state_copySimon Ser
This function was weird because it copied some fields but not all.
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-08-10backend/drm: always perform a test commit in drm_connector_testSimon Ser
This allows callers to use wlr_output_test to check whether a mode can be enabled, for instance. Closes: https://github.com/swaywm/wlroots/issues/2250
2021-08-10backend/drm: add proper error handling to wlr_drm_backend_createSimon Ser
Some listeners weren't removed and caused a use-after-free with e.g. vkms when used as a secondary GPU.
2021-08-08ci: add smoke testSimon Ser
Add a very basic smoke test which uses VKMS to fire up the DRM backend.
2021-08-07input/pointer: try harder to not send duplicate motion eventsTudor Brindus
wl_fixed_t is a 32-bit data type, but our doubles are 64-bit. This meant that two doubles that would map to the same wl_fixed_t could compare unequal, and send a duplicate motion event. Refs swaywm/sway#4632.
2021-08-06seat: allow compositors to not load a keymapSimon Ser
The protocol allows compositors to not send any keymap to Wayland clients. Handle a keymap-less keyboard correctly by sending WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP instead of erroring out in the mmap call.
2021-08-06build: remove "." from include dirsSimon Ser
2021-08-06examples/fullscreen-shell: remove unused render_data.view fieldSimon Ser
2021-08-04backend/drm: require buffer on modeset in drm_connector_testSimon Ser
When testing a modeset, make sure the caller has also provided a buffer. This allows df0e75ba05e2 ("output: try skipping buffer allocation if the backend allows it") to work as expected with the DRM backend. Closes: https://github.com/swaywm/wlroots/issues/3086
2021-08-04output: try skipping buffer allocation if the backend allows itSimon Ser
When enabling an output, skip the empty buffer allocation if the backend accepts modesets without a buffer. This fixes mode-setting with the noop backend.
2021-08-03render/pixman/pixel_format: add more formatsSimon Ser
Add a bunch of new formats for Pixman: a few missing 32-bit ones, some 16-bit and 32-bit formats as well. Mostly based on a Weston patch [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/664
2021-08-03render/pixel_format: add more formats for PixmanSimon Ser
These will be added to Pixman in the next commit.
2021-08-02backend/drm: preserve mode order from kernelSimon Ser
The kernel orders the mode list from highest to lowest. Preserve this ordering in the wlr_output.modes list.
2021-08-02surface: don't cache frame callback listsKirill Primak
2021-08-02viewporter: remove crop and scale state upon destructionQuantum
According to the viewport protocol, upon wp_viewport::destroy(): > The associated wl_surface's crop and scale state is removed. > The change is applied on the next wl_surface.commit. Therefore, wp_viewport_destroy(viewport) should remove all viewport state. Currently, wlroots does not remove the crop and scale state. Instead, a client must do: wl_fixed_t clear = wl_fixed_from_int(-1); wp_viewport_set_source(viewport, clear, clear, clear, clear); wp_viewport_set_destination(viewport, -1, -1); wp_viewport_destroy(viewport); This commit adds the necessary logic into viewport_destroy and makes wlroots comply with the protocol.
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-30render/pixel-format: add a few 10-bit and FP16 formatsManuel Stoeckl
2021-07-29render/gles2: add support for some 24 and 16-bit formatsSimon Ser
On little-endian, we can enable pixel formats which don't use gl_type = GL_UNSIGNED_BYTE. See [1]. [1]: https://afrantzis.com/pixel-format-guide/
2021-07-29render/pixel-format: add some 24 and 16-bit formatsSimon Ser
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-29backend/noop: drop attach_render/rollback_renderSimon Ser
We no longer require wlr_output_impl.{attach,rollback}_render to be populated.
2021-07-28backend/drm: fix wrong type for get_cursor_format return valuesSimon Ser
These are bools but should be pointers.
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.
2021-07-28backend/drm: drop drm_surface_{make,unset}_currentSimon Ser
2021-07-28backend/drm: remove SCANOUT check in drm_connector_testSimon Ser
We only accept SCANOUT, the buffer type should never be set to RENDER.
2021-07-28backend/drm: remove primary swapchainSimon Ser
We can't nuke it completely, we still need it for multi-GPU.
2021-07-28backend/drm: allow legacy scan-out if FB props matchSimon Ser
Historically we haven't allowed direct scan-out for legacy KMS, because legacy misses the functionality to make sure a buffer can be scanned out. However with renderer v6 the backend can't figure out anymore whether the buffer comes from its internal swap-chain, because the backend doesn't have an internal swap-chain. The legacy KMS API guarantees that the driver won't reject a buffer as long as it's been allocated with the same parameters as the previous one. Let's check this in legacy_crtc_test.
2021-07-28output: fallback to modifier-less allocation on modeset test failureSimon Ser
Sometimes we allocate a buffer with modifiers but then fail to perform a modeset with it. This can happen on Intel because of bandwidth limitations. To mitigate this issue, it's possible to re-allocate the buffer with modifiers. Add the logic to do so in wlr_output.
2021-07-28output: allocate and attach empty buffer on modesetSimon Ser
Some backends need a buffer in order to be able to perform a modeset.
2021-07-28output: use pending resolution when allocating swapchainSimon Ser
This allows the swapchain to be created with the correct resolution during a mode change.
2021-07-28backend/drm: implement get_primary_formatsSimon Ser
2021-07-28output: fallback to XRGB in output_pick_formatSimon Ser
This will be necessary for the primary buffer.
2021-07-28util/time: make NSEC_PER_SEC staticDylan Araps
This fixes static linking with libseat. Closes #3072
2021-07-27render/egl: initialize wlr_egl with EGL_PLATFORM_DEVICE_EXTSimon Zeni
Uses the EXT_device_query extension to get the EGL device matching the requested DRM file descriptor. If the extension is not supported or no device is found, the EGL device will be retrieved using GBM. Depends on the EGL_EXT_device_enumeration to get the list of EGL devices.
2021-07-27render/egl: fix typoyuiiio
2021-07-27xwayland: embed wlr_xwayland_server_options in server structSimon Ser
As more options are added, more fields will be duplicated. Let's just embed the struct in wlr_xwayland_server so that we don't need to keep both in sync.
2021-07-27xwayland: simplify argv filling logicSimon Ser
Remove fill_arg and replace it with stack-allocations and simple array-filling.