diff --git a/Cargo.lock b/Cargo.lock index e22c94bd7..5044acde6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -469,12 +469,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - [[package]] name = "block-buffer" version = "0.10.4" @@ -615,12 +609,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -711,36 +699,6 @@ dependencies = [ "cc", ] -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types 0.5.0", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "libc", - "objc", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -2102,11 +2060,11 @@ dependencies = [ "ironrdp-tls", "ironrdp-tokio", "proc-exit", - "raw-window-handle 0.6.2", + "raw-window-handle", "reqwest", "semver", "smallvec", - "softbuffer 0.4.5", + "softbuffer", "sspi", "tap", "tokio", @@ -2438,7 +2396,7 @@ dependencies = [ "rgb", "semver", "smallvec", - "softbuffer 0.3.4", + "softbuffer", "tap", "time", "tracing", @@ -2621,15 +2579,6 @@ dependencies = [ "libc", ] -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - [[package]] name = "match_cfg" version = "0.1.0" @@ -2773,7 +2722,7 @@ dependencies = [ "log", "ndk-sys 0.6.0+11769913", "num_enum", - "raw-window-handle 0.6.2", + "raw-window-handle", "thiserror", ] @@ -2818,7 +2767,7 @@ checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.6.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", ] @@ -2947,15 +2896,6 @@ dependencies = [ "syn", ] -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - [[package]] name = "objc-sys" version = "0.3.5" @@ -3749,12 +3689,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "raw-window-handle" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -4405,28 +4339,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "softbuffer" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f266ce2aa23eaaaa4e758ed44495d505d00fb79f359d46f6c1900cb053123b62" -dependencies = [ - "bytemuck", - "cfg_aliases 0.1.1", - "cocoa", - "core-graphics", - "foreign-types 0.5.0", - "js-sys", - "log", - "objc", - "raw-window-handle 0.5.2", - "redox_syscall 0.4.1", - "wasm-bindgen", - "wayland-sys", - "web-sys", - "windows-sys 0.48.0", -] - [[package]] name = "softbuffer" version = "0.4.5" @@ -4435,7 +4347,7 @@ checksum = "d623bff5d06f60d738990980d782c8c866997d9194cfe79ecad00aa2f76826dd" dependencies = [ "as-raw-xcb-connection", "bytemuck", - "cfg_aliases 0.2.1", + "cfg_aliases", "core-graphics", "drm", "fastrand", @@ -4447,7 +4359,7 @@ dependencies = [ "objc2-app-kit", "objc2-foundation", "objc2-quartz-core", - "raw-window-handle 0.6.2", + "raw-window-handle", "redox_syscall 0.5.3", "rustix", "tiny-xlib", @@ -5796,7 +5708,7 @@ dependencies = [ "block2", "bytemuck", "calloop", - "cfg_aliases 0.2.1", + "cfg_aliases", "concurrent-queue", "core-foundation", "core-graphics", @@ -5813,7 +5725,7 @@ dependencies = [ "orbclient", "percent-encoding", "pin-project", - "raw-window-handle 0.6.2", + "raw-window-handle", "redox_syscall 0.4.1", "rustix", "sctk-adwaita", diff --git a/crates/ironrdp-web/Cargo.toml b/crates/ironrdp-web/Cargo.toml index 502927413..f27ad8c9e 100644 --- a/crates/ironrdp-web/Cargo.toml +++ b/crates/ironrdp-web/Cargo.toml @@ -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 - diff --git a/crates/ironrdp-web/src/canvas.rs b/crates/ironrdp-web/src/canvas.rs index b44995f92..963c594ad 100644 --- a/crates/ironrdp-web/src/canvas.rs +++ b/crates/ironrdp-web/src/canvas.rs @@ -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, } 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 { unimplemented!() }