rect: safer construction
This commit is contained in:
parent
411af0ea18
commit
a1dfc473a2
33 changed files with 245 additions and 159 deletions
|
|
@ -86,7 +86,7 @@ impl WlBuffer {
|
|||
id,
|
||||
destroyed: Cell::new(false),
|
||||
client: client.clone(),
|
||||
rect: Rect::new_sized(0, 0, width, height).unwrap(),
|
||||
rect: Rect::new_sized_saturating(0, 0, width, height),
|
||||
format,
|
||||
width,
|
||||
height,
|
||||
|
|
@ -154,7 +154,7 @@ impl WlBuffer {
|
|||
id,
|
||||
destroyed: Cell::new(false),
|
||||
client: client.clone(),
|
||||
rect: Rect::new_sized(0, 0, width, height).unwrap(),
|
||||
rect: Rect::new_sized_saturating(0, 0, width, height),
|
||||
format,
|
||||
dmabuf: None,
|
||||
render_ctx_version: Cell::new(client.state.render_ctx_version.get()),
|
||||
|
|
@ -183,7 +183,7 @@ impl WlBuffer {
|
|||
id,
|
||||
destroyed: Cell::new(false),
|
||||
client: client.clone(),
|
||||
rect: Rect::new_sized(0, 0, 1, 1).unwrap(),
|
||||
rect: Rect::new_sized_saturating(0, 0, 1, 1),
|
||||
format: ARGB8888,
|
||||
dmabuf: None,
|
||||
render_ctx_version: Cell::new(client.state.render_ctx_version.get()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue