mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
bump smithay
This commit is contained in:
parent
1da99f4003
commit
10e59040c4
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -3355,7 +3355,7 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
||||
[[package]]
|
||||
name = "smithay"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/Smithay/smithay.git#234586dbea6bc084cb72a32f164997e47ea36b2b"
|
||||
source = "git+https://github.com/Smithay/smithay.git?rev=90f622fa9a4ff64d25944ae8a172e26a237dc9c8#90f622fa9a4ff64d25944ae8a172e26a237dc9c8"
|
||||
dependencies = [
|
||||
"appendlist",
|
||||
"bitflags 2.5.0",
|
||||
@ -3429,7 +3429,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "smithay-drm-extras"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/Smithay/smithay.git#234586dbea6bc084cb72a32f164997e47ea36b2b"
|
||||
source = "git+https://github.com/Smithay/smithay.git?rev=90f622fa9a4ff64d25944ae8a172e26a237dc9c8#90f622fa9a4ff64d25944ae8a172e26a237dc9c8"
|
||||
dependencies = [
|
||||
"drm",
|
||||
"edid-rs",
|
||||
|
@ -21,11 +21,13 @@ tracy-client = { version = "0.17.0", default-features = false }
|
||||
|
||||
[workspace.dependencies.smithay]
|
||||
git = "https://github.com/Smithay/smithay.git"
|
||||
rev = "90f622fa9a4ff64d25944ae8a172e26a237dc9c8"
|
||||
# path = "../smithay"
|
||||
default-features = false
|
||||
|
||||
[workspace.dependencies.smithay-drm-extras]
|
||||
git = "https://github.com/Smithay/smithay.git"
|
||||
rev = "90f622fa9a4ff64d25944ae8a172e26a237dc9c8"
|
||||
# path = "../smithay/smithay-drm-extras"
|
||||
|
||||
[package]
|
||||
|
@ -148,7 +148,9 @@ impl OutputDevice {
|
||||
builder.add_connector(connector);
|
||||
builder.add_crtc(*crtc);
|
||||
let planes = self.drm.planes(crtc).map_err(LeaseRejected::with_cause)?;
|
||||
builder.add_plane(planes.primary.handle);
|
||||
for plane in &planes.primary {
|
||||
builder.add_plane(plane.handle);
|
||||
}
|
||||
}
|
||||
Ok(builder)
|
||||
}
|
||||
@ -1987,8 +1989,8 @@ fn surface_dmabuf_feedback(
|
||||
let surface = compositor.surface();
|
||||
let planes = surface.planes();
|
||||
|
||||
let plane_formats = planes
|
||||
.primary
|
||||
let plane_formats = surface
|
||||
.plane_info()
|
||||
.formats
|
||||
.iter()
|
||||
.chain(planes.overlay.iter().flat_map(|p| p.formats.iter()))
|
||||
|
@ -48,9 +48,9 @@ impl CompositorHandler for State {
|
||||
fn new_surface(&mut self, surface: &WlSurface) {
|
||||
add_pre_commit_hook::<Self, _>(surface, move |state, _dh, surface| {
|
||||
let maybe_dmabuf = with_states(surface, |surface_data| {
|
||||
surface_data
|
||||
.cached_state
|
||||
.pending::<SurfaceAttributes>()
|
||||
let mut guard = surface_data.cached_state.get::<SurfaceAttributes>();
|
||||
guard
|
||||
.pending()
|
||||
.buffer
|
||||
.as_ref()
|
||||
.and_then(|assignment| match assignment {
|
||||
|
@ -1000,8 +1000,10 @@ pub fn add_mapped_toplevel_pre_commit_hook(toplevel: &ToplevelSurface) -> HookId
|
||||
};
|
||||
|
||||
let (got_unmapped, commit_serial) = with_states(surface, |states| {
|
||||
let attrs = states.cached_state.pending::<SurfaceAttributes>();
|
||||
let got_unmapped = matches!(attrs.buffer, Some(BufferAssignment::Removed));
|
||||
let got_unmapped = {
|
||||
let mut guard = states.cached_state.get::<SurfaceAttributes>();
|
||||
matches!(guard.current().buffer, Some(BufferAssignment::Removed))
|
||||
};
|
||||
|
||||
let role = states
|
||||
.data_map
|
||||
|
@ -17,7 +17,7 @@ pub trait NiriRenderer:
|
||||
+ AsGlesRenderer
|
||||
{
|
||||
// Associated types to work around the instability of associated type bounds.
|
||||
type NiriTextureId: Texture + Clone + 'static;
|
||||
type NiriTextureId: Texture + Clone + Send + 'static;
|
||||
type NiriError: std::error::Error
|
||||
+ Send
|
||||
+ Sync
|
||||
@ -28,7 +28,7 @@ pub trait NiriRenderer:
|
||||
impl<R> NiriRenderer for R
|
||||
where
|
||||
R: ImportAll + ImportMem + ExportMem + Bind<Dmabuf> + Offscreen<GlesTexture> + AsGlesRenderer,
|
||||
R::TextureId: Texture + Clone + 'static,
|
||||
R::TextureId: Texture + Clone + Send + 'static,
|
||||
R::Error: std::error::Error + Send + Sync + From<<GlesRenderer as Renderer>::Error> + 'static,
|
||||
{
|
||||
type NiriTextureId = R::TextureId;
|
||||
|
@ -25,7 +25,7 @@ pub fn render_snapshot_from_surface_tree(
|
||||
let data = states.data_map.get::<RendererSurfaceStateUserData>();
|
||||
|
||||
if let Some(data) = data {
|
||||
let data = &*data.borrow();
|
||||
let data = &*data.lock().unwrap();
|
||||
|
||||
if let Some(view) = data.view() {
|
||||
location += view.offset.to_f64();
|
||||
@ -42,19 +42,17 @@ pub fn render_snapshot_from_surface_tree(
|
||||
let data = states.data_map.get::<RendererSurfaceStateUserData>();
|
||||
|
||||
if let Some(data) = data {
|
||||
if let Some(view) = data.borrow().view() {
|
||||
location += view.offset.to_f64();
|
||||
} else {
|
||||
let Some(view) = data.lock().unwrap().view() else {
|
||||
return;
|
||||
}
|
||||
};
|
||||
location += view.offset.to_f64();
|
||||
|
||||
if let Err(err) = import_surface(renderer, states) {
|
||||
warn!("failed to import surface: {err:?}");
|
||||
return;
|
||||
}
|
||||
|
||||
let data = data.borrow();
|
||||
let view = data.view().unwrap();
|
||||
let data = data.lock().unwrap();
|
||||
let Some(texture) = data.texture::<GlesRenderer>(renderer.id()) else {
|
||||
return;
|
||||
};
|
||||
|
@ -461,8 +461,8 @@ impl LayoutElement for Mapped {
|
||||
|
||||
fn min_size(&self) -> Size<i32, Logical> {
|
||||
let mut size = with_states(self.toplevel().wl_surface(), |state| {
|
||||
let curr = state.cached_state.current::<SurfaceCachedState>();
|
||||
curr.min_size
|
||||
let mut guard = state.cached_state.get::<SurfaceCachedState>();
|
||||
guard.current().min_size
|
||||
});
|
||||
|
||||
if let Some(x) = self.rules.min_width {
|
||||
@ -477,8 +477,8 @@ impl LayoutElement for Mapped {
|
||||
|
||||
fn max_size(&self) -> Size<i32, Logical> {
|
||||
let mut size = with_states(self.toplevel().wl_surface(), |state| {
|
||||
let curr = state.cached_state.current::<SurfaceCachedState>();
|
||||
curr.max_size
|
||||
let mut guard = state.cached_state.get::<SurfaceCachedState>();
|
||||
guard.current().max_size
|
||||
});
|
||||
|
||||
if let Some(x) = self.rules.max_width {
|
||||
|
Loading…
Reference in New Issue
Block a user