chore(web): bump softbuffer to 0.4.5

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2024-08-07 12:32:54 +04:00 committed by Benoît Cortier
parent 7a6173ab40
commit c97b1f90bc
3 changed files with 13 additions and 101 deletions

View file

@ -39,7 +39,7 @@ gloo-timers = { version = "0.3", default-features = false, features = ["futures"
tracing-web = "0.1"
# Rendering
softbuffer = { version = "0.3", default-features = false }
softbuffer = { version = "0.4", default-features = false }
png = "0.17"
resize = { version = "0.8", features = ["std"], default-features = false }
rgb = "0.8"
@ -74,4 +74,3 @@ base64 = "0.22"
[lints]
workspace = true

View file

@ -1,11 +1,12 @@
use std::num::NonZeroU32;
use ironrdp::pdu::geometry::{InclusiveRectangle, Rectangle as _};
use softbuffer::{NoDisplayHandle, NoWindowHandle};
use web_sys::HtmlCanvasElement;
pub(crate) struct Canvas {
width: u32,
surface: softbuffer::Surface,
surface: softbuffer::Surface<NoDisplayHandle, NoWindowHandle>,
}
impl Canvas {
@ -21,7 +22,7 @@ impl Canvas {
#[cfg(not(target_arch = "wasm32"))]
let mut surface = {
fn stub(_: HtmlCanvasElement) -> softbuffer::Surface {
fn stub(_: HtmlCanvasElement) -> softbuffer::Surface<NoDisplayHandle, NoWindowHandle> {
unimplemented!()
}