all: run rustfmt
This commit is contained in:
parent
d2913449ea
commit
ce183a0f45
5 changed files with 22 additions and 15 deletions
|
|
@ -8,7 +8,7 @@ use {
|
||||||
edid::Descriptor,
|
edid::Descriptor,
|
||||||
format::{Format, XRGB8888},
|
format::{Format, XRGB8888},
|
||||||
ifs::wp_presentation_feedback::{KIND_HW_COMPLETION, KIND_VSYNC},
|
ifs::wp_presentation_feedback::{KIND_HW_COMPLETION, KIND_VSYNC},
|
||||||
render::{Framebuffer, RenderContext, RenderResult, Texture},
|
render::{Framebuffer, RenderContext, RenderResult, ResetStatus, Texture},
|
||||||
state::State,
|
state::State,
|
||||||
utils::{
|
utils::{
|
||||||
asyncevent::AsyncEvent, bitflags::BitflagsExt, clonecell::CloneCell,
|
asyncevent::AsyncEvent, bitflags::BitflagsExt, clonecell::CloneCell,
|
||||||
|
|
@ -37,7 +37,6 @@ use {
|
||||||
},
|
},
|
||||||
uapi::c,
|
uapi::c,
|
||||||
};
|
};
|
||||||
use crate::render::ResetStatus;
|
|
||||||
|
|
||||||
pub struct PendingDrmDevice {
|
pub struct PendingDrmDevice {
|
||||||
pub id: DrmId,
|
pub id: DrmId,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::ops::Deref;
|
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
client::{Client, ClientError},
|
client::{Client, ClientError},
|
||||||
|
|
@ -12,15 +10,18 @@ use {
|
||||||
utils::{
|
utils::{
|
||||||
buffd::{MsgParser, MsgParserError},
|
buffd::{MsgParser, MsgParserError},
|
||||||
clonecell::CloneCell,
|
clonecell::CloneCell,
|
||||||
|
errorfmt::ErrorFmt,
|
||||||
},
|
},
|
||||||
wire::{wl_buffer::*, WlBufferId},
|
video::dmabuf::DmaBuf,
|
||||||
|
wire::{jay_screenshot::Dmabuf, wl_buffer::*, WlBufferId},
|
||||||
|
},
|
||||||
|
std::{
|
||||||
|
cell::{Cell, RefCell},
|
||||||
|
ops::Deref,
|
||||||
|
rc::Rc,
|
||||||
},
|
},
|
||||||
std::{cell::Cell, rc::Rc},
|
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
use crate::utils::errorfmt::ErrorFmt;
|
|
||||||
use crate::video::dmabuf::DmaBuf;
|
|
||||||
use crate::wire::jay_screenshot::Dmabuf;
|
|
||||||
|
|
||||||
pub enum WlBufferStorage {
|
pub enum WlBufferStorage {
|
||||||
Shm { mem: ClientMemOffset, stride: i32 },
|
Shm { mem: ClientMemOffset, stride: i32 },
|
||||||
|
|
@ -135,7 +136,10 @@ impl WlBuffer {
|
||||||
let image = match ctx.dmabuf_img(dmabuf) {
|
let image = match ctx.dmabuf_img(dmabuf) {
|
||||||
Ok(image) => image,
|
Ok(image) => image,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("Cannot re-import wl_buffer after graphics context reset: {}", ErrorFmt(e));
|
log::error!(
|
||||||
|
"Cannot re-import wl_buffer after graphics context reset: {}",
|
||||||
|
ErrorFmt(e)
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,13 @@ impl WlDrm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let img = ctx.dmabuf_img(&dmabuf)?;
|
let img = ctx.dmabuf_img(&dmabuf)?;
|
||||||
let buffer = Rc::new(WlBuffer::new_dmabuf(req.id, &self.client, format, dmabuf, &img));
|
let buffer = Rc::new(WlBuffer::new_dmabuf(
|
||||||
|
req.id,
|
||||||
|
&self.client,
|
||||||
|
format,
|
||||||
|
dmabuf,
|
||||||
|
&img,
|
||||||
|
));
|
||||||
track!(self.client, buffer);
|
track!(self.client, buffer);
|
||||||
self.client.add_client_obj(&buffer)?;
|
self.client.add_client_obj(&buffer)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
use std::ops::Deref;
|
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
client::{Client, ClientError},
|
client::{Client, ClientError},
|
||||||
|
|
@ -16,7 +15,7 @@ use {
|
||||||
},
|
},
|
||||||
wire::{zwlr_screencopy_frame_v1::*, WlBufferId, ZwlrScreencopyFrameV1Id},
|
wire::{zwlr_screencopy_frame_v1::*, WlBufferId, ZwlrScreencopyFrameV1Id},
|
||||||
},
|
},
|
||||||
std::{cell::Cell, rc::Rc},
|
std::{cell::Cell, ops::Deref, rc::Rc},
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use {
|
||||||
wl_seat::{SeatIds, WlSeatGlobal},
|
wl_seat::{SeatIds, WlSeatGlobal},
|
||||||
wl_surface::{
|
wl_surface::{
|
||||||
zwp_idle_inhibitor_v1::{IdleInhibitorId, IdleInhibitorIds, ZwpIdleInhibitorV1},
|
zwp_idle_inhibitor_v1::{IdleInhibitorId, IdleInhibitorIds, ZwpIdleInhibitorV1},
|
||||||
NoneSurfaceExt,
|
NoneSurfaceExt, WlSurface,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
leaks::Tracker,
|
leaks::Tracker,
|
||||||
|
|
@ -53,7 +53,6 @@ use {
|
||||||
time::Duration,
|
time::Duration,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use crate::ifs::wl_surface::WlSurface;
|
|
||||||
|
|
||||||
pub struct State {
|
pub struct State {
|
||||||
pub xkb_ctx: XkbContext,
|
pub xkb_ctx: XkbContext,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue