- Add module that deals with different kinds of buffers (memory and external),
their allocation and usage for rendering. Also try to properly support modifiers this time.
- Describe gbm functionality as an allocator (instead of a rendering device/surface).
- Also create a quick-and-dirty dumb buffer allocator for tesing / simpler tasks.
- Add a (current untested) wrapper for dmabufs and some code for converting from gbm for now.
- (also untested) Swapchain helper to manage front/backbuffers for surfaceless rendering.
This fixes the following clippy warnings:
error: usage of `Rc<T>` when T is a buffer type
--> src/wayland/dmabuf/mod.rs:265:14
|
265 | formats: Rc<Vec<Format>>,
| ^^^^^^^^^^^^^^^ help: try: `Rc<[Format]>`
|
= note: `-D clippy::rc-buffer` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#rc_buffer
error: usage of `Rc<T>` when T is a buffer type
--> src/wayland/shm/mod.rs:91:14
|
91 | formats: Rc<Vec<wl_shm::Format>>,
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Rc<[wl_shm::Format]>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#rc_buffer
Signed-off-by: Uli Schlachter <psychon@znc.in>
slog-stdlog has a significant dependency tree and is basically unsued if
the downstream crate of Smithay always provides a logger (like anvil),
so it is not really needed.
This commit removes some clippy warnings (to advance #45) by doing the following:
- replace usage of `mem::uninitialized()` with `MaybeUninit`
- replace usage of `nix::libc::{uint64_t, int32_t}` with `{u64, i32}`
- replace functions inside of `Option::ok_or` with `Option::ok_or_else`
- replace functions inside of `Result::unwrap_or` with `Result::unwrap_or_else`
- replace occurrences of pass-by-reference with pass-by-value when
appropriate
- replace unused variables in pattern-matching with wildcards
- replace `match` expressions that have only one case with `if let`
expressions
- replace UpperCamelCase names of consts with SCREAMING_SNAKE_CASE
- remove `clone()` on types that implement Copy
- remove redundant imports
- remove `fn main()` from doctests
- remove let binding for variables that are returned afterwards
Rework the subsurface tree by:
- forbidding subsurface loops
- storing the relative depth of a parent to its children,
finally respecting the wl_subsurface specification.
closes#23