chore: Update smithay
This commit is contained in:
parent
11e5a63bb6
commit
bdcb803efa
7 changed files with 43 additions and 28 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -3457,7 +3457,7 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smithay"
|
name = "smithay"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/smithay//smithay?rev=43ce6b4372#43ce6b437257151acfdd00d633d2bd69c3114376"
|
source = "git+https://github.com/smithay//smithay?rev=8d239c79ae#8d239c79ae5a7f08d6acbc17183c0576af3edd38"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"appendlist",
|
"appendlist",
|
||||||
"ash",
|
"ash",
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ debug = true
|
||||||
lto = "fat"
|
lto = "fat"
|
||||||
|
|
||||||
[patch."https://github.com/Smithay/smithay.git"]
|
[patch."https://github.com/Smithay/smithay.git"]
|
||||||
smithay = { git = "https://github.com/smithay//smithay", rev = "43ce6b4372" }
|
smithay = { git = "https://github.com/smithay//smithay", rev = "8d239c79ae" }
|
||||||
|
|
||||||
[patch."https://github.com/pop-os/libcosmic/"]
|
[patch."https://github.com/pop-os/libcosmic/"]
|
||||||
libcosmic = { git = "https://github.com/pop-os/libcosmic//", rev = "42d7baf" }
|
libcosmic = { git = "https://github.com/pop-os/libcosmic//", rev = "42d7baf" }
|
||||||
|
|
@ -33,11 +33,12 @@ use smithay::{
|
||||||
libinput::{LibinputInputBackend, LibinputSessionInterface},
|
libinput::{LibinputInputBackend, LibinputSessionInterface},
|
||||||
renderer::{
|
renderer::{
|
||||||
buffer_dimensions,
|
buffer_dimensions,
|
||||||
damage::{Error as RenderError, OutputNoMode},
|
damage::{Error as RenderError, OutputNoMode, RenderOutputResult},
|
||||||
element::Element,
|
element::Element,
|
||||||
gles::{GlesRenderbuffer, GlesTexture},
|
gles::{GlesRenderbuffer, GlesTexture},
|
||||||
glow::GlowRenderer,
|
glow::GlowRenderer,
|
||||||
multigpu::{gbm::GbmGlesBackend, Error as MultiError, GpuManager},
|
multigpu::{gbm::GbmGlesBackend, Error as MultiError, GpuManager},
|
||||||
|
sync::SyncPoint,
|
||||||
Bind, ImportDma, Offscreen,
|
Bind, ImportDma, Offscreen,
|
||||||
},
|
},
|
||||||
session::{libseat::LibSeatSession, Event as SessionEvent, Session},
|
session::{libseat::LibSeatSession, Event as SessionEvent, Session},
|
||||||
|
|
@ -1094,6 +1095,7 @@ impl Surface {
|
||||||
|_node, buffer, renderer, dt, age| {
|
|_node, buffer, renderer, dt, age| {
|
||||||
let res = dt.damage_output(age, &elements)?;
|
let res = dt.damage_output(age, &elements)?;
|
||||||
|
|
||||||
|
let mut sync = SyncPoint::default();
|
||||||
if let (Some(ref damage), _) = &res {
|
if let (Some(ref damage), _) = &res {
|
||||||
if let Ok(dmabuf) = get_dmabuf(buffer) {
|
if let Ok(dmabuf) = get_dmabuf(buffer) {
|
||||||
renderer.bind(dmabuf).map_err(RenderError::Rendering)?;
|
renderer.bind(dmabuf).map_err(RenderError::Rendering)?;
|
||||||
|
|
@ -1120,7 +1122,7 @@ impl Surface {
|
||||||
self.output.current_scale().fractional_scale(),
|
self.output.current_scale().fractional_scale(),
|
||||||
self.output.current_transform(),
|
self.output.current_transform(),
|
||||||
);
|
);
|
||||||
frame_result
|
sync = frame_result
|
||||||
.blit_frame_result(
|
.blit_frame_result(
|
||||||
output_size,
|
output_size,
|
||||||
output_transform,
|
output_transform,
|
||||||
|
|
@ -1140,7 +1142,11 @@ impl Surface {
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(res)
|
Ok(RenderOutputResult {
|
||||||
|
damage: res.0,
|
||||||
|
states: res.1,
|
||||||
|
sync,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
Ok(true) => {} // success
|
Ok(true) => {} // success
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,10 @@ use smithay::{
|
||||||
drm::DrmNode,
|
drm::DrmNode,
|
||||||
renderer::{
|
renderer::{
|
||||||
buffer_dimensions,
|
buffer_dimensions,
|
||||||
damage::{Error as RenderError, OutputDamageTracker, OutputNoMode},
|
damage::{Error as RenderError, OutputDamageTracker, OutputNoMode, RenderOutputResult},
|
||||||
element::{
|
element::{
|
||||||
utils::{Relocate, RelocateRenderElement},
|
utils::{Relocate, RelocateRenderElement},
|
||||||
AsRenderElements, Element, Id, RenderElement, RenderElementStates,
|
AsRenderElements, Element, Id, RenderElement,
|
||||||
},
|
},
|
||||||
gles::{
|
gles::{
|
||||||
element::PixelShaderElement, GlesError, GlesPixelProgram, GlesRenderer, Uniform,
|
element::PixelShaderElement, GlesError, GlesPixelProgram, GlesRenderer, Uniform,
|
||||||
|
|
@ -55,12 +55,13 @@ use smithay::{
|
||||||
},
|
},
|
||||||
glow::GlowRenderer,
|
glow::GlowRenderer,
|
||||||
multigpu::{gbm::GbmGlesBackend, Error as MultiError, MultiFrame, MultiRenderer},
|
multigpu::{gbm::GbmGlesBackend, Error as MultiError, MultiFrame, MultiRenderer},
|
||||||
|
sync::SyncPoint,
|
||||||
Bind, Blit, ExportMem, ImportAll, ImportMem, Offscreen, Renderer, TextureFilter,
|
Bind, Blit, ExportMem, ImportAll, ImportMem, Offscreen, Renderer, TextureFilter,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
desktop::layer_map_for_output,
|
desktop::layer_map_for_output,
|
||||||
output::Output,
|
output::Output,
|
||||||
utils::{IsAlive, Logical, Physical, Point, Rectangle, Scale},
|
utils::{IsAlive, Logical, Point, Rectangle, Scale},
|
||||||
wayland::{
|
wayland::{
|
||||||
dmabuf::get_dmabuf,
|
dmabuf::get_dmabuf,
|
||||||
shell::wlr_layer::Layer,
|
shell::wlr_layer::Layer,
|
||||||
|
|
@ -719,7 +720,7 @@ pub fn render_output<R, Target, OffTarget, Source>(
|
||||||
cursor_mode: CursorMode,
|
cursor_mode: CursorMode,
|
||||||
screencopy: Option<(Source, &[(ScreencopySession, BufferParams)])>,
|
screencopy: Option<(Source, &[(ScreencopySession, BufferParams)])>,
|
||||||
fps: Option<&mut Fps>,
|
fps: Option<&mut Fps>,
|
||||||
) -> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), RenderError<R>>
|
) -> Result<RenderOutputResult, RenderError<R>>
|
||||||
where
|
where
|
||||||
R: Renderer
|
R: Renderer
|
||||||
+ ImportAll
|
+ ImportAll
|
||||||
|
|
@ -777,7 +778,7 @@ pub fn render_workspace<R, Target, OffTarget, Source>(
|
||||||
screencopy: Option<(Source, &[(ScreencopySession, BufferParams)])>,
|
screencopy: Option<(Source, &[(ScreencopySession, BufferParams)])>,
|
||||||
mut fps: Option<&mut Fps>,
|
mut fps: Option<&mut Fps>,
|
||||||
exclude_workspace_overview: bool,
|
exclude_workspace_overview: bool,
|
||||||
) -> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), RenderError<R>>
|
) -> Result<RenderOutputResult, RenderError<R>>
|
||||||
where
|
where
|
||||||
R: Renderer
|
R: Renderer
|
||||||
+ ImportAll
|
+ ImportAll
|
||||||
|
|
@ -881,7 +882,11 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(res)
|
Ok(RenderOutputResult {
|
||||||
|
damage: res.0,
|
||||||
|
sync: SyncPoint::default(),
|
||||||
|
states: res.1,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
Ok(true) => {} // success
|
Ok(true) => {} // success
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,10 @@ use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
egl::EGLDevice,
|
egl::EGLDevice,
|
||||||
renderer::{
|
renderer::{
|
||||||
damage::OutputDamageTracker, gles::GlesRenderbuffer, glow::GlowRenderer, ImportDma,
|
damage::{OutputDamageTracker, RenderOutputResult},
|
||||||
ImportEgl,
|
gles::GlesRenderbuffer,
|
||||||
|
glow::GlowRenderer,
|
||||||
|
ImportDma, ImportEgl,
|
||||||
},
|
},
|
||||||
winit::{self, WinitEvent, WinitGraphicsBackend, WinitVirtualDevice},
|
winit::{self, WinitEvent, WinitGraphicsBackend, WinitVirtualDevice},
|
||||||
},
|
},
|
||||||
|
|
@ -73,7 +75,7 @@ impl WinitState {
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
Some(&mut self.fps),
|
Some(&mut self.fps),
|
||||||
) {
|
) {
|
||||||
Ok((damage, states)) => {
|
Ok(RenderOutputResult { damage, states, .. }) => {
|
||||||
self.backend
|
self.backend
|
||||||
.bind()
|
.bind()
|
||||||
.with_context(|| "Failed to bind display")?;
|
.with_context(|| "Failed to bind display")?;
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,10 @@ use smithay::{
|
||||||
egl::{EGLContext, EGLDevice, EGLDisplay},
|
egl::{EGLContext, EGLDevice, EGLDisplay},
|
||||||
input::{Event, InputEvent},
|
input::{Event, InputEvent},
|
||||||
renderer::{
|
renderer::{
|
||||||
damage::OutputDamageTracker, gles::GlesRenderbuffer, glow::GlowRenderer, Bind,
|
damage::{OutputDamageTracker, RenderOutputResult},
|
||||||
ImportDma, ImportEgl,
|
gles::GlesRenderbuffer,
|
||||||
|
glow::GlowRenderer,
|
||||||
|
Bind, ImportDma, ImportEgl,
|
||||||
},
|
},
|
||||||
vulkan::{version::Version, Instance, PhysicalDevice},
|
vulkan::{version::Version, Instance, PhysicalDevice},
|
||||||
x11::{Window, WindowBuilder, X11Backend, X11Event, X11Handle, X11Input, X11Surface},
|
x11::{Window, WindowBuilder, X11Backend, X11Event, X11Handle, X11Input, X11Surface},
|
||||||
|
|
@ -240,7 +242,7 @@ impl Surface {
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
Some(&mut self.fps),
|
Some(&mut self.fps),
|
||||||
) {
|
) {
|
||||||
Ok((damage, states)) => {
|
Ok(RenderOutputResult { damage, states, .. }) => {
|
||||||
self.screencopy.clear();
|
self.screencopy.clear();
|
||||||
self.surface
|
self.surface
|
||||||
.submit()
|
.submit()
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,8 @@ use smithay::{
|
||||||
egl::EGLDevice,
|
egl::EGLDevice,
|
||||||
renderer::{
|
renderer::{
|
||||||
buffer_dimensions, buffer_type,
|
buffer_dimensions, buffer_type,
|
||||||
damage::{Error as DTError, OutputDamageTracker, OutputNoMode},
|
damage::{Error as DTError, OutputDamageTracker, OutputNoMode, RenderOutputResult},
|
||||||
element::{
|
element::{surface::WaylandSurfaceRenderElement, AsRenderElements, RenderElement},
|
||||||
surface::WaylandSurfaceRenderElement, AsRenderElements, RenderElement,
|
|
||||||
RenderElementStates,
|
|
||||||
},
|
|
||||||
gles::{Capability, GlesError, GlesRenderbuffer, GlesRenderer},
|
gles::{Capability, GlesError, GlesRenderbuffer, GlesRenderer},
|
||||||
Bind, Blit, BufferType, ExportMem, ImportAll, ImportMem, Offscreen, Renderer,
|
Bind, Blit, BufferType, ExportMem, ImportAll, ImportMem, Offscreen, Renderer,
|
||||||
},
|
},
|
||||||
|
|
@ -606,8 +603,7 @@ where
|
||||||
&mut R,
|
&mut R,
|
||||||
&mut OutputDamageTracker,
|
&mut OutputDamageTracker,
|
||||||
usize,
|
usize,
|
||||||
)
|
) -> Result<RenderOutputResult, DTError<R>>,
|
||||||
-> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), DTError<R>>,
|
|
||||||
{
|
{
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
puffin::profile_function!();
|
puffin::profile_function!();
|
||||||
|
|
@ -622,7 +618,11 @@ where
|
||||||
params.age as usize,
|
params.age as usize,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if let (Some(damage), _) = res {
|
if let RenderOutputResult {
|
||||||
|
damage: Some(damage),
|
||||||
|
..
|
||||||
|
} = res
|
||||||
|
{
|
||||||
submit_buffer(session, ¶ms.buffer, renderer, transform, damage)
|
submit_buffer(session, ¶ms.buffer, renderer, transform, damage)
|
||||||
.map_err(DTError::Rendering)?;
|
.map_err(DTError::Rendering)?;
|
||||||
Ok(true)
|
Ok(true)
|
||||||
|
|
@ -654,7 +654,7 @@ pub fn render_output_to_buffer(
|
||||||
common: &mut Common,
|
common: &mut Common,
|
||||||
session: &Session,
|
session: &Session,
|
||||||
output: &Output,
|
output: &Output,
|
||||||
) -> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), DTError<R>>
|
) -> Result<RenderOutputResult, DTError<R>>
|
||||||
where
|
where
|
||||||
R: Renderer
|
R: Renderer
|
||||||
+ ImportAll
|
+ ImportAll
|
||||||
|
|
@ -786,7 +786,7 @@ pub fn render_workspace_to_buffer(
|
||||||
session: &Session,
|
session: &Session,
|
||||||
output: &Output,
|
output: &Output,
|
||||||
handle: (WorkspaceHandle, usize),
|
handle: (WorkspaceHandle, usize),
|
||||||
) -> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), DTError<R>>
|
) -> Result<RenderOutputResult, DTError<R>>
|
||||||
where
|
where
|
||||||
R: Renderer
|
R: Renderer
|
||||||
+ ImportAll
|
+ ImportAll
|
||||||
|
|
@ -934,7 +934,7 @@ pub fn render_window_to_buffer(
|
||||||
common: &mut Common,
|
common: &mut Common,
|
||||||
window: &CosmicSurface,
|
window: &CosmicSurface,
|
||||||
geometry: Rectangle<i32, Logical>,
|
geometry: Rectangle<i32, Logical>,
|
||||||
) -> Result<(Option<Vec<Rectangle<i32, Physical>>>, RenderElementStates), DTError<R>>
|
) -> Result<RenderOutputResult, DTError<R>>
|
||||||
where
|
where
|
||||||
R: Renderer
|
R: Renderer
|
||||||
+ ImportAll
|
+ ImportAll
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue