Commit Graph

111 Commits

Author SHA1 Message Date
Victor Brekenfeld e008360bde allocator: Let the allocator select the best modifier out of a given set.
This change fixes modifier selection by delegating this to the allocators
and thus to libgbm, which can ask the driver for an appropriate modifier
for scanout, that results in the best possible performance.

We do not have this information, the order in which modifiers are returned
by EGL has no meaning and this is far better then testing modifiers
non-deterministically at random and choosing the first one, that does
not error out...
2021-06-03 11:19:22 +02:00
Victor Brekenfeld 12e80ca2c6 cargo fmt 2021-05-26 19:12:45 +02:00
Victor Brekenfeld 2843c5c374 Address some review comments 2021-05-23 15:13:04 +02:00
Victor Brekenfeld a4f66da69f drm: Properly expose planes for surfaces 2021-05-20 01:06:16 +02:00
Victor Brekenfeld 149c923876 cargo fmt 2021-05-15 18:17:43 +02:00
Victor Brekenfeld 378f826c26 swapchain: do not convert buffers automatically anymore 2021-05-15 16:12:13 +02:00
Victor Brekenfeld 7e47d648d4 First pass of adding documentation 2021-05-15 16:12:12 +02:00
Victor Brekenfeld 52c01535d0 rustfmt 2021-05-15 16:12:12 +02:00
Victor Brekenfeld 05f11cffeb examples: fix raw_drm 2021-05-15 16:12:12 +02:00
Victor Brekenfeld d606165088 Restructure drm backend
- Remove the `Device`, `Surface`, `RawDevice` and `RawSurface` traits.
  We are not trying to merge the different responsibilities between...
  - Drm-Surfaces: crtcs and planes for displaying buffers
  - Gbm-Surfaces: allocating and managing front- and back-buffers
  - EGL-Surfaces: Load drawing apis.
  ..anymore.
- Instead unify the legacy and atomic backends into one `DrmDevice` and
  a `DrmSurface`, that under the hood dispatches onto the different modules.
- Do not keep a list of surfaces inside the devices. These are reference-counting
  nightmares and a frequent issue due to the read-only nature of `Rc` and `Arc` and
  thread-safety related problems.
- Surfaces are mostly doing state-tracking independently of each other
  and contain some more helper functions.
- Simplify session code, because we do not need to pass the events
  through three layers of devices and surfaces anymore.
- Each surface now represents a plane. Rendering to a plane is just like
  any other rendering step, including the Cursor-plane.
  (Legacy interfaces only have one to avoid dealing with short-comings of the api).
2021-05-15 16:12:12 +02:00
Jonas Platte bcc8f13b2b Fix most rustc & clippy warnings 2020-09-16 12:56:32 +02:00
Victor Brekenfeld 7b4459f649 drm: Make surfaces `Send` 2020-06-11 18:57:05 +02:00
Victor Brekenfeld 69c1116d82 eglstream: initial backend implementation 2020-05-23 00:29:32 +02:00
Victor Brekenfeld 9300e35093 lint: fmt 2020-04-30 19:03:02 +02:00
Victor Brekenfeld 31b6d84442 WIP: Rework egl and glium errors 2020-04-30 00:24:35 +02:00
Victor Brekenfeld d6fa2e96cf drm: Require all surfaces to always have a mode set 2020-04-27 00:45:58 +02:00
Victor Brekenfeld a4203bd216 examples/anvil: add disable_connectors for device creation 2020-04-27 00:45:58 +02:00
Victor Brekenfeld 9127502066 examples: add raw_atomic_drm 2020-04-21 20:18:34 +02:00
Victor Brekenfeld df097b835e example: use set_connectors in raw_legacy_drm 2020-04-21 20:18:34 +02:00
Victor Brekenfeld 4b2e19cade fixup raw_legacy flip after commit 2020-04-21 20:18:34 +02:00
Victor Brekenfeld 74187f55fc examples: move raw_drm to raw_legacy_drm 2020-04-21 20:18:34 +02:00
Victor Berger 6a7d933553 Replace `failure` and `error-chain` by `thiserror` 2020-04-13 13:20:59 +02:00
Victor Brekenfeld f6b3d630ce rustfmt 2020-04-10 19:18:58 +02:00
Victor Berger d30d901771 Update raw_drm example 2020-04-10 16:59:01 +02:00
Victor Berger 89dce178c8 Make wayland support optional 2019-02-06 09:29:56 +01:00
Victor Brekenfeld e5f8c351c7 Check for rust_2018_idioms 2018-12-16 19:31:38 +01:00
Victor Brekenfeld f3c37de1c0 Fix example crates 2018-12-16 14:56:36 +01:00
Victor Brekenfeld dc97e0ad03 Add reexports module 2018-12-14 14:26:50 +01:00
Victor Brekenfeld a8343edbd7 legacy: add legacy drm example 2018-12-05 22:51:41 +01:00
Victor Berger 23faeae20f move examples into our own compositor: anvil 2018-05-07 19:56:38 +02:00
Victor Berger 4fda0bef4a review comments 2018-04-24 11:00:39 +02:00
Victor Berger ebee5feb9e wayland-rs 0.20.1 works around the rustc bug 2018-04-23 18:26:17 +02:00
Victor Berger 048dda59e3 wayland.shell: legacy module for wl_shell 2018-04-23 11:40:41 +02:00
Victor Berger 12e13f863b wayland.shell.xdg: make names more explicit 2018-04-23 10:49:06 +02:00
Victor Berger 4579f20fae port examples to wayland_rs 0.20 2018-04-22 11:58:39 +02:00
Drakulix d051e141cf Refactor PointerAxisEvent to handle multiple axis 2018-03-22 16:10:32 +01:00
Drakulix daccddf9b6 Reintroduce wl_seat 4 support 2018-03-22 16:10:32 +01:00
Drakulix 2fb36af926 Upgrade to wl_seat version 5 2018-03-21 16:37:50 +01:00
Drakulix bdb653042c Update glium integration to allow mutable borrowing 2018-03-09 11:50:01 +01:00
Drakulix 5cfdf931fb Update for wayland-server 0.14 2018-02-21 21:02:14 +01:00
Drakulix f4d3061b2b Fix tests & examples 2018-02-21 14:52:43 +01:00
Drakulix 4a2658090b Code formatting 2018-02-21 14:24:37 +01:00
Drakulix b80674bdf5 Introduce SessionObserver
`DrmDevice` and `UdevBackend` now do not need to be wrapped into `StateToken`s anymore, but can return a separate `SessionObserver` object using the new `AsSessionObserver` trait.

This change was motivated by allowing the `UdevHandle` to obtain a mutable reference to an `EventLoopHandle` to create wayland object, e.g. a `wl_output` object.

Previously this was not possible.

Depends on https://github.com/Smithay/wayland-rs/pull/164
2018-02-21 14:24:20 +01:00
Victor Berger 6560e413c0 udev example: handle all 12 vt switches 2018-02-21 00:01:19 +01:00
Drakulix 5725d1bb34 Remove broken ctrlc helper 2018-02-20 19:19:22 +01:00
Drakulix 1d042d04e1 fix vagga build 2018-02-20 19:19:22 +01:00
Drakulix 525c9b60c4 rustfmt 2018-02-20 19:19:22 +01:00
Drakulix 4501ca5fe1 Fix weston-terminal spawn in example 2018-02-20 19:19:22 +01:00
Drakulix 11c9f2b0fb Make udev example use new auto session 2018-02-20 19:19:22 +01:00
Drakulix a9c75656a2 Add event_loop to `InputBackend` and `InputHandler` traits 2018-01-12 16:41:33 +01:00