Skip to content

Commit f85d06a

Browse files
authored
Version bump 0.6.0 (#1707)
Version & Changelog for 0.6.0
1 parent d2399c9 commit f85d06a

File tree

2 files changed

+184
-1
lines changed

2 files changed

+184
-1
lines changed

CHANGELOG.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,189 @@
22

33
## Unreleased
44

5+
## 0.6.0
6+
7+
### Breaking Changes
8+
9+
`RenderContext::draw` callback now accepts a mutable reference
10+
```diff
11+
-fn smithay::backend::renderer::element::texture::RenderContext::draw(&mut self, f: impl FnOnce(&T))
12+
+fn smithay::backend::renderer::element::texture::RenderContext::draw(&mut self, f: impl FnOnce(&mut T))
13+
```
14+
15+
Framebuffer now requires `Texture` implementation
16+
```rs
17+
type smithay::backend::renderer::RendererSuper::Framebuffer: smithay::backend::renderer::Texture
18+
```
19+
20+
`Output::client_outputs` no longer returns a Vec
21+
```diff
22+
-fn smithay::output::Output::client_outputs(&self, client: &Client) -> Vec<WlOutput>;
23+
+fn smithay::output::Output::client_outputs(&self, client: &Client) -> impl Iterator<Item = WlOutput>;
24+
```
25+
DamageBag/DamageSnapshot damage getters got renamed
26+
```diff
27+
-fn smithay::backend::renderer::utils::DamageBag::damage(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
28+
+fn smithay::backend::renderer::utils::DamageBag::raw(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
29+
-fn smithay::backend::renderer::utils::DamageSnapshot::damage(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
30+
+fn smithay::backend::renderer::utils::DamageSnapshot::raw(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
31+
```
32+
RendererSurfaceState::damage now returns a DamageSnapshot
33+
```diff
34+
-fn smithay::backend::renderer::utils::RendererSurfaceState::damage(&self) -> impl core::iter::traits::iterator::Iterator<Item = impl core::iter::traits::iterator::Iterator<Item = &smithay::utils::Rectangle<i32, smithay::utils::Buffer>>>
35+
+fn smithay::backend::renderer::utils::RendererSurfaceState::damage(&self) -> smithay::backend::renderer::utils::DamageSnapshot<i32, smithay::utils::Buffer>
36+
```
37+
Client scale can now be fractional
38+
```diff
39+
-fn smithay::wayland::compositor::CompositorClientState::client_scale(&self) -> u32
40+
+fn smithay::wayland::compositor::CompositorClientState::client_scale(&self) -> f64
41+
-fn smithay::wayland::compositor::CompositorClientState::set_client_scale(&self, new_scale: u32)
42+
+fn smithay::wayland::compositor::CompositorClientState::set_client_scale(&self, new_scale: f64)
43+
```
44+
45+
Raw `renderer_id` got replaced with new `smithay::backend::renderer::ContextId` newtype
46+
```diff
47+
-fn smithay::backend::renderer::gles::GlesFrame::id(&self) -> usize;
48+
+fn smithay::backend::renderer::gles::GlesFrame::context_id(&self) -> ContextId;
49+
-fn smithay::backend::renderer::gles::GlesRenderer::id(&self) -> usize;
50+
+fn smithay::backend::renderer::gles::GlesRenderer::context_id(&self) -> ContextId;
51+
-fn smithay::backend::renderer::glow::GlowFrame::id(&self) -> usize;
52+
+fn smithay::backend::renderer::glow::GlowFrame::context_id(&self) -> ContextId;
53+
-fn smithay::backend::renderer::glow::GlowRenderer::id(&self) -> usize;
54+
+fn smithay::backend::renderer::glow::GlowRenderer::context_id(&self) -> ContextId;
55+
-fn smithay::backend::renderer::multigpu::MultiFrame::id(&self) -> usize;
56+
+fn smithay::backend::renderer::multigpu::MultiFrame::context_id(&self) -> ContextId;
57+
-fn smithay::backend::renderer::multigpu::MultiRenderer::id(&self) -> usize;
58+
+fn smithay::backend::renderer::multigpu::MultiRenderer::context_id(&self) -> ContextId;
59+
-fn smithay::backend::renderer::pixman::PixmanFrame::id(&self) -> usize;
60+
+fn smithay::backend::renderer::pixman::PixmanFrame::context_id(&self) -> ContextId;
61+
-fn smithay::backend::renderer::pixman::PixmanRenderer::id(&self) -> usize;
62+
+fn smithay::backend::renderer::pixman::PixmanRenderer::context_id(&self) -> ContextId;
63+
-fn smithay::backend::renderer::test::DummyFrame::id(&self) -> usize;
64+
+fn smithay::backend::renderer::test::DummyFrame::context_id(&self) -> ContextId;
65+
-fn smithay::backend::renderer::test::DummyRenderer::id(&self) -> usize;
66+
+fn smithay::backend::renderer::test::DummyRenderer::context_id(&self) -> ContextId;
67+
-fn smithay::backend::renderer::Frame::id(&self) -> usize;
68+
+fn smithay::backend::renderer::Frame::context_id(&self) -> ContextId;
69+
-fn smithay::backend::renderer::Renderer::id(&self) -> usize;
70+
+fn smithay::backend::renderer::Renderer::context_id(&self) -> ContextId;
71+
-fn smithay::backend::renderer::element::texture::TextureRenderElement::from_static_texture(id: Id, renderer_id: usize, ...) -> Self;
72+
+fn smithay::backend::renderer::element::texture::TextureRenderElement::from_static_texture(id: Id, context_id: ContextId, ...) -> Self;
73+
-fn smithay::backend::renderer::element::texture::TextureRenderElement::from_texture_with_damage(id: Id, renderer_id: usize, ...) -> Self;
74+
+fn smithay::backend::renderer::element::texture::TextureRenderElement::from_texture_with_damage(id: Id, context_id: ContextId, ...) -> Self;
75+
-fn smithay::backend::renderer::utils::RendererSurfaceState::texture<R>(&self, id: usize) -> Option<&TextureId>;
76+
+fn smithay::backend::renderer::utils::RendererSurfaceState::texture<R>(&self, id: &ContextId) -> Option<&TextureId>;
77+
```
78+
79+
`CursorShapeDeviceUserData` now has an additional generic argument
80+
```diff
81+
-struct smithay::wayland::cursor_shape::CursorShapeDeviceUserData;
82+
+struct smithay::wayland::cursor_shape::CursorShapeDeviceUserData<D: SeatHandler>;
83+
```
84+
85+
The explicit frame buffers got introduced, but for the sake of my sanity those changes are not described here, you can look at: https://github.com/Smithay/smithay/commit/df08c6f29eb6ebfa2fce6fc374590483bcbaf21a
86+
87+
### API Additions
88+
89+
It is now possible to check if the OpenGL context is shared with another.
90+
```rs
91+
fn smithay::backend::egl::context::EGLContext::is_shared();
92+
```
93+
It is now possible to check that there are no other references to the underlying GL texture.
94+
```rs
95+
fn smithay::backend::renderer::gles::GlesTexture::is_unique_reference();
96+
```
97+
98+
There is a new gles capability for support of fencing and exporting to EGL
99+
```rs
100+
smithay::backend::renderer::gles::Capability::ExportFence;
101+
```
102+
103+
There is a new BlitFrame trait for frames that support blitting contents from/to the current framebuffer to/from another.
104+
```rs
105+
trait smithay::backend::renderer::BlitFrame;
106+
impl BlitFrame for smithay::backend::renderer::gles::GlesFrame;
107+
impl BlitFrame for smithay::backend::renderer::glow::GlowFrame;
108+
impl BlitFrame for smithay::backend::renderer::multigpu::MultiFrame;
109+
```
110+
111+
It is now possible to iterate over all known tokens and their associated data
112+
```rs
113+
fn smithay::wayland::xdg_activation::XdgActivationState::tokens() -> impl Iterator<Item = (&XdgActivationToken, &XdgActivationTokenData)>;
114+
```
115+
116+
There are new errors for missing DRM crtc/connector/plane mapping
117+
```rs
118+
smithay::backend::drm::DrmError::{UnknownConnector, UnknownCrtc, UnknownPlane};
119+
```
120+
121+
Texture has a few new implementations
122+
```rs
123+
impl Texture for smithay::backend::renderer::gles::GlesTarget;
124+
impl Texture for smithay::backend::renderer::multigpu:MultiFramebuffer;
125+
impl Texture for smithay::backend::renderer::pixman::PixmanTarget;
126+
impl Texture for smithay::backend::renderer::test::DummyFramebuffer
127+
```
128+
129+
It is now possible to access WlKeyboard/WlPointer instances
130+
```rs
131+
fn smithay::input::keyboard::KeyboardHandle::client_keyboards(&self, client: &Client) -> impl Iterator<Item = WlKeyboard>;
132+
fn smithay::input::pointer::PointerHandle::client_pointers(&self, client: &:Client) -> impl Iterator<Item = WlPointer>;
133+
```
134+
135+
New APIs for X11 randr output management
136+
```rs
137+
enum smithay::xwayland::xwm::PrimaryOutputError { OutputUnknown, X11Error(x11rb::errors::ReplyError) };
138+
139+
impl From<x11rb::errors::ConnectionError> for smithay::xwayland::xwm::PrimaryOutputError;
140+
fn smithay::xwayland::xwm::PrimaryOutputError::from(value: x11rb::errors::ConnectionError) -> Self;
141+
fn smithay::xwayland::xwm::X11Wm::get_randr_primary_output(&self) -> Result<Option<String>, x11rb::errors::ReplyError>;
142+
fn smithay::xwayland::xwm::X11Wm::set_randr_primary_output(&mut self, output: Option<&smithay::output::Output>) -> Result<(), smithay::xwayland::xwm::PrimaryOutputError>;
143+
fn smithay::xwayland::xwm::XwmHandler::randr_primary_output_change(&mut self, xwm: smithay::xwayland::xwm::XwmId, output_name: Option<String>);
144+
```
145+
146+
It is now possible to get the DrmNode of the device the buffer was allocated on
147+
```rs
148+
fn smithay::backend::allocator::gbm::GbmBuffer::device_node(&self) -> Option<drm::node::DrmNode>;
149+
```
150+
151+
It is now possible to create a `GbmBuffer` from an existing `BufferObject` explicitly defining the device node
152+
```rs
153+
fn smithay::backend::allocator::gbm::GbmBuffer::from_bo_with_node(bo: gbm::buffer_object::BufferObject<()>, implicit: bool, drm_node: core::option::Option<drm::node::DrmNode>) -> Self;
154+
```
155+
156+
It is now possible to access the `Allocator` of this output manager
157+
```rs
158+
fn smithay::backend::drm::output::DrmOutputManager::allocator(&self) -> &Allocator;
159+
```
160+
161+
Is is now possible to check if EGLDevice is backed by actual device node or is it a software device.
162+
```rs
163+
fn smithay::backend::egl::EGLDevice::is_software(&self) -> bool
164+
```
165+
166+
This adds a way to query next deadline of a commit timing barrier.
167+
Allows a compositor to schedule re-evaluating commit timers without
168+
busy looping.
169+
```rs
170+
fn smithay::wayland::commit_timing::CommitTimerBarrierState::next_deadline(&self) -> Option<smithay::wayland::commit_timing::Timestamp>;
171+
```
172+
173+
Support for casting `Timestamp` back to `Time`
174+
This might be useful to compare the next deadline with a monotonic time
175+
from the presentation clock
176+
```rs
177+
impl From<smithay::wayland::commit_timing::Timestamp> for smithay::utils::Time;
178+
```
179+
180+
Support for creating a weak reference to a `Seat`
181+
```rs
182+
fn smithay::input::Seat::downgrade(&self) -> smithay::input::WeakSeat;
183+
184+
fn smithay::input::WeakSeat::is_alive(&self) -> bool;
185+
pub fn smithay::input::WeakSeat::upgrade(&self) -> Option<smithay::input::Seat>;
186+
```
187+
5188
## 0.5.0
6189

7190
### API Changes

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "smithay"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
authors = ["Victor Berger <[email protected]>", "Drakulix (Victoria Brekenfeld)"]
55
license = "MIT"
66
description = "Smithay is a library for writing wayland compositors."

0 commit comments

Comments
 (0)