diff --git a/Cargo.lock b/Cargo.lock index c063b01fbc..9948c793f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,12 +34,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "aes" version = "0.8.4" @@ -115,6 +109,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "aligned-vec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" + [[package]] name = "allocator-api2" version = "0.2.16" @@ -233,18 +233,23 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "arrayref" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -285,9 +290,9 @@ dependencies = [ [[package]] name = "ashpd" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01992ad7774250d5b7fe214e2676cb99bf92564436d8135ab44fe815e71769a9" +checksum = "1b22517ee647547c01a687cf9b76074e1c91334032a4324f7243c6ee0f949390" dependencies = [ "async-fs 2.1.1", "async-net 2.0.0", @@ -298,7 +303,7 @@ dependencies = [ "serde", "serde_repr", "url", - "zbus 3.15.1", + "zbus", ] [[package]] @@ -351,16 +356,6 @@ dependencies = [ "workspace", ] -[[package]] -name = "async-broadcast" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" -dependencies = [ - "event-listener 2.5.3", - "futures-core", -] - [[package]] name = "async-broadcast" version = "0.7.0" @@ -825,6 +820,29 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "av1-grain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" +dependencies = [ + "arrayvec", +] + [[package]] name = "aws-config" version = "1.1.5" @@ -1271,7 +1289,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide 0.7.1", + "miniz_oxide", "object", "rustc-demangle", ] @@ -1394,6 +1412,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + [[package]] name = "bitflags" version = "1.3.2" @@ -1409,6 +1433,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitstream-io" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c9989a51171e2e81038ab168b6ae22886fe9ded214430dbb4f41c28cf176da" + [[package]] name = "bitvec" version = "1.0.1" @@ -1590,6 +1620,12 @@ dependencies = [ "serde", ] +[[package]] +name = "built" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d17f4d6e4dc36d1a02fbedc2753a096848e7c1b0772f7654eab8e2c927dd53" + [[package]] name = "bumpalo" version = "3.14.0" @@ -1855,6 +1891,16 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-expr" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -2565,19 +2611,21 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75acbfb314aeb4f5210d379af45ed1ec2c98c7f1790bf57b8a4c562ac0c51b71" +checksum = "c578f2b9abb4d5f3fbb12aba4008084d435dc6a8425c195cfe0b3594bfea0c25" dependencies = [ - "fontdb 0.15.0", + "bitflags 2.4.2", + "fontdb", "libm", "log", "rangemap", "rustc-hash", - "rustybuzz 0.11.0", + "rustybuzz", "self_cell", "swash", "sys-locale", + "ttf-parser", "unicode-bidi", "unicode-linebreak", "unicode-script", @@ -2799,7 +2847,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] @@ -2822,6 +2870,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-bigint" version = "0.4.9" @@ -2948,12 +3002,9 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-url" -version = "0.1.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30bfce702bcfa94e906ef82421f2c0e61c076ad76030c16ee5d2e9a32fe193" -dependencies = [ - "matches", -] +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "db" @@ -2972,16 +3023,6 @@ dependencies = [ "util", ] -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - [[package]] name = "der" version = "0.6.1" @@ -3475,6 +3516,22 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "exr" +version = "1.72.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + [[package]] name = "extension" version = "0.1.0" @@ -3606,6 +3663,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "fdeflate" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +dependencies = [ + "simd-adler32", +] + [[package]] name = "feature_flags" version = "0.1.0" @@ -3708,14 +3774,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] name = "float-cmp" -version = "0.5.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" [[package]] name = "float-ord" @@ -3777,32 +3843,21 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree 0.19.0", + "roxmltree", ] [[package]] name = "fontdb" -version = "0.5.4" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58903f4f8d5b58c7d300908e4ebe5289c1bfdf5587964330f12023b8ff17fd1" -dependencies = [ - "log", - "memmap2 0.2.3", - "ttf-parser 0.12.3", -] - -[[package]] -name = "fontdb" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020e203f177c0fb250fb19455a252e838d2bbbce1f80f25ecc42402aafa8cd38" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.8.0", + "memmap2 0.9.4", "slotmap", "tinyvec", - "ttf-parser 0.19.2", + "ttf-parser", ] [[package]] @@ -3849,9 +3904,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -4161,9 +4216,19 @@ dependencies = [ [[package]] name = "gif" -version = "0.11.4" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gif" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", @@ -4378,8 +4443,6 @@ dependencies = [ "taffy", "thiserror", "time", - "tiny-skia", - "usvg", "util", "uuid", "waker-fn", @@ -4437,6 +4500,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -4516,6 +4589,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -4744,9 +4823,9 @@ checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4770,21 +4849,35 @@ dependencies = [ [[package]] name = "image" -version = "0.23.14" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +checksum = "a9b4f005360d32e9325029b38ba47ebd7a56f3316df09249368939562d518645" dependencies = [ "bytemuck", "byteorder", "color_quant", - "gif", - "jpeg-decoder", - "num-iter", - "num-rational 0.3.2", + "exr", + "gif 0.13.1", + "image-webp", "num-traits", "png", - "scoped_threadpool", + "qoi", + "ravif", + "rayon", + "rgb", "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a84a25dcae3ac487bc24ef280f9e20c79c9b1a3e5e32cbed3041d1c514aa87c" +dependencies = [ + "byteorder", + "thiserror", ] [[package]] @@ -4800,6 +4893,18 @@ dependencies = [ "workspace", ] +[[package]] +name = "imagesize" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" + +[[package]] +name = "imgref" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" + [[package]] name = "indexmap" version = "1.9.3" @@ -4888,6 +4993,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "io-extras" version = "0.18.1" @@ -5089,12 +5205,9 @@ dependencies = [ [[package]] name = "jpeg-decoder" -version = "0.1.22" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" -dependencies = [ - "rayon", -] +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" @@ -5152,11 +5265,21 @@ dependencies = [ [[package]] name = "kurbo" -version = "0.8.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a53776d271cfb873b17c618af0298445c88afc52837f3e948fa3fafd131f449" +checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", +] + +[[package]] +name = "kurbo" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" +dependencies = [ + "arrayvec", + "smallvec", ] [[package]] @@ -5362,12 +5485,29 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + [[package]] name = "libc" version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +[[package]] +name = "libfuzzer-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +dependencies = [ + "arbitrary", + "cc", + "once_cell", +] + [[package]] name = "libgit2-sys" version = "0.14.2+1.5.1" @@ -5494,7 +5634,7 @@ name = "live_kit_client" version = "0.1.0" dependencies = [ "anyhow", - "async-broadcast 0.7.0", + "async-broadcast", "async-trait", "collections", "core-foundation", @@ -5549,6 +5689,15 @@ dependencies = [ "value-bag", ] +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "lsp" version = "0.1.0" @@ -5661,12 +5810,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -5679,6 +5822,16 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "md-5" version = "0.10.5" @@ -5715,15 +5868,6 @@ dependencies = [ "rustix 0.38.32", ] -[[package]] -name = "memmap2" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.8.0" @@ -5742,15 +5886,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -5804,25 +5939,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -5830,6 +5946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] @@ -5988,18 +6105,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", -] - [[package]] name = "nix" version = "0.27.1" @@ -6009,7 +6114,7 @@ dependencies = [ "bitflags 2.4.2", "cfg-if", "libc", - "memoffset 0.9.0", + "memoffset", ] [[package]] @@ -6039,6 +6144,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + [[package]] name = "notifications" version = "0.1.0" @@ -6104,7 +6215,7 @@ dependencies = [ "num-complex", "num-integer", "num-iter", - "num-rational 0.4.1", + "num-rational", "num-traits", ] @@ -6174,6 +6285,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -6195,17 +6317,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.1" @@ -6334,7 +6445,7 @@ dependencies = [ "jni 0.20.0", "ndk", "ndk-context", - "num-derive", + "num-derive 0.3.3", "num-traits", "oboe-sys", ] @@ -6378,9 +6489,9 @@ dependencies = [ "rand 0.8.5", "serde", "sha2 0.10.7", - "zbus 4.0.1", + "zbus", "zeroize", - "zvariant 4.0.2", + "zvariant", ] [[package]] @@ -6391,9 +6502,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "open" -version = "5.0.1" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90878fb664448b54c4e592455ad02831e23a3f7e157374a8b95654731aac7349" +checksum = "449f0ff855d85ddbf1edd5b646d65249ead3f5e422aaa86b7d2d0b049b103e32" dependencies = [ "is-wsl", "libc", @@ -6715,9 +6826,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" @@ -6744,7 +6855,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher 0.3.11", + "siphasher", ] [[package]] @@ -6764,9 +6875,9 @@ dependencies = [ [[package]] name = "pico-args" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" @@ -6864,14 +6975,15 @@ dependencies = [ [[package]] name = "png" -version = "0.16.8" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", - "deflate", - "miniz_oxide 0.3.7", + "fdeflate", + "flate2", + "miniz_oxide", ] [[package]] @@ -7261,6 +7373,21 @@ dependencies = [ "unicase", ] +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quick-xml" version = "0.30.0" @@ -7384,6 +7511,56 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "977b1e897f9d764566891689e642653e5ed90c6895106acd005eb4c1d0203991" +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive 0.4.2", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand 0.8.5", + "rand_chacha 0.3.1", + "simd_helpers", + "system-deps", + "thiserror", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + [[package]] name = "raw-window-handle" version = "0.5.2" @@ -7428,12 +7605,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rctree" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9e29cb19c8fe84169fcb07f8f11e66bc9e6e0280efd4715c54818296f8a4a8" - [[package]] name = "read-fonts" version = "0.15.3" @@ -7635,16 +7806,17 @@ dependencies = [ [[package]] name = "resvg" -version = "0.14.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09697862c5c3f940cbaffef91969c62188b5c8ed385b0aef43a5ff01ddc8000f" +checksum = "024e40e1ba7313fc315b1720298988c0cd6f8bfe3754b52838aafecebd11355a" dependencies = [ + "gif 0.12.0", "jpeg-decoder", "log", "pico-args", "png", "rgb", - "svgfilters", + "svgtypes", "tiny-skia", "usvg", ] @@ -7775,7 +7947,7 @@ dependencies = [ name = "rope" version = "0.1.0" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bromberg_sl2", "gpui", "log", @@ -7785,15 +7957,6 @@ dependencies = [ "util", ] -[[package]] -name = "roxmltree" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921904a62e410e37e215c40381b7117f830d9d89ba60ab5236170541dd25646b" -dependencies = [ - "xmlparser", -] - [[package]] name = "roxmltree" version = "0.19.0" @@ -7908,7 +8071,7 @@ version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "borsh", "bytes 1.5.0", "num-traits", @@ -8030,31 +8193,15 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rustybuzz" -version = "0.3.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab463a295d00f3692e0974a0bfd83c7a9bcd119e27e07c2beecdb1b44a09d10" +checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" dependencies = [ - "bitflags 1.3.2", - "bytemuck", - "smallvec", - "ttf-parser 0.9.0", - "unicode-bidi-mirroring", - "unicode-ccc", - "unicode-general-category", - "unicode-script", -] - -[[package]] -name = "rustybuzz" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee8fe2a8461a0854a37101fe7a1b13998d0cfa987e43248e81d2a5f4570f6fa" -dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "bytemuck", "libm", "smallvec", - "ttf-parser 0.20.0", + "ttf-parser", "unicode-bidi-mirroring", "unicode-ccc", "unicode-properties", @@ -8067,15 +8214,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "safe_arch" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" -dependencies = [ - "bytemuck", -] - [[package]] name = "safemem" version = "0.3.3" @@ -8140,12 +8278,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - [[package]] name = "scopeguard" version = "1.2.0" @@ -8618,6 +8750,21 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "simdutf8" version = "0.1.4" @@ -8662,12 +8809,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" - [[package]] name = "siphasher" version = "0.3.11" @@ -9158,6 +9299,15 @@ dependencies = [ "ui", ] +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp", +] + [[package]] name = "stringprep" version = "0.1.4" @@ -9217,7 +9367,7 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" name = "sum_tree" version = "0.1.0" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "ctor", "env_logger", "log", @@ -9299,24 +9449,14 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" -[[package]] -name = "svgfilters" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0dce2fee79ac40c21dafba48565ff7a5fa275e23ffe9ce047a40c9574ba34e" -dependencies = [ - "float-cmp", - "rgb", -] - [[package]] name = "svgtypes" -version = "0.5.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c536faaff1a10837cfe373142583f6e27d81e96beba339147e77b67c9f260ff" +checksum = "59d7618f12b51be8171a7cfdda1e7a93f79cbc57c4e7adf89a749cf671125241" dependencies = [ - "float-cmp", - "siphasher 0.2.3", + "kurbo 0.10.4", + "siphasher", ] [[package]] @@ -9382,6 +9522,19 @@ dependencies = [ "windows 0.52.0", ] +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.10", + "version-compare", +] + [[package]] name = "system-interface" version = "0.27.1" @@ -9425,7 +9578,7 @@ name = "taffy" version = "0.3.11" source = "git+https://github.com/DioxusLabs/taffy?rev=1876f72bee5e376023eaa518aa7b8a34c769bd1b#1876f72bee5e376023eaa518aa7b8a34c769bd1b" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "grid", "num-traits", "slotmap", @@ -9711,12 +9864,12 @@ dependencies = [ [[package]] name = "tiff" -version = "0.6.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ + "flate2", "jpeg-decoder", - "miniz_oxide 0.4.4", "weezl", ] @@ -9775,16 +9928,28 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.5.1" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf81f2900d2e235220e6f31ec9f63ade6a7f59090c556d74fe949bb3b15e9fe" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec", "bytemuck", "cfg-if", + "log", "png", - "safe_arch", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", ] [[package]] @@ -10513,24 +10678,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "ttf-parser" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ddb402ac6c2af6f7a2844243887631c4e94b51585b229fcfddb43958cd55ca" - -[[package]] -name = "ttf-parser" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae2f58a822f08abdaf668897e96a5656fe72f5a9ce66422423e8849384872e6" - -[[package]] -name = "ttf-parser" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" - [[package]] name = "ttf-parser" version = "0.20.0" @@ -10588,7 +10735,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.0", + "memoffset", "tempfile", "winapi", ] @@ -10636,12 +10783,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" -[[package]] -name = "unicode-general-category" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9af028e052a610d99e066b33304625dea9613170a2563314490a4e6ec5cf7f" - [[package]] name = "unicode-ident" version = "1.0.12" @@ -10725,9 +10866,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -10743,25 +10884,25 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "usvg" -version = "0.14.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8352f317d8f9a918ba5154797fb2a93e2730244041cf7d5be35148266adfa5" +checksum = "c04150a94f0bfc3b2c15d4e151524d14cd06765fc6641d8b1c59a248360d4474" dependencies = [ - "base64 0.13.1", + "base64 0.21.4", "data-url", "flate2", - "fontdb 0.5.4", - "kurbo", + "fontdb", + "imagesize", + "kurbo 0.9.5", "log", - "memmap2 0.2.3", "pico-args", - "rctree", - "roxmltree 0.14.1", - "rustybuzz 0.3.0", + "roxmltree", + "rustybuzz", "simplecss", - "siphasher 0.2.3", + "siphasher", + "strict-num", "svgtypes", - "ttf-parser 0.12.3", + "tiny-skia-path", "unicode-bidi", "unicode-script", "unicode-vo", @@ -10818,6 +10959,17 @@ dependencies = [ "sha1_smol", ] +[[package]] +name = "v_frame" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.0" @@ -10880,6 +11032,12 @@ dependencies = [ "workspace", ] +[[package]] +name = "version-compare" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" + [[package]] name = "version_check" version = "0.9.4" @@ -10998,9 +11156,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -11008,9 +11166,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -11035,9 +11193,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -11045,9 +11203,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -11058,9 +11216,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-encoder" @@ -11308,7 +11466,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.9.0", + "memoffset", "paste", "psm", "rustix 0.38.32", @@ -11544,9 +11702,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "welcome" @@ -12338,54 +12496,13 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "zbus" -version = "3.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acecd3f8422f198b1a2f954bcc812fe89f3fa4281646f3da1da7925db80085d" -dependencies = [ - "async-broadcast 0.5.1", - "async-executor", - "async-fs 1.6.0", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process 1.7.0", - "async-recursion 1.0.5", - "async-task", - "async-trait", - "blocking", - "byteorder", - "derivative", - "enumflags2", - "event-listener 2.5.3", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix 0.26.4", - "once_cell", - "ordered-stream", - "rand 0.8.5", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tracing", - "uds_windows", - "winapi", - "xdg-home", - "zbus_macros 3.15.1", - "zbus_names 2.6.1", - "zvariant 3.15.1", -] - [[package]] name = "zbus" version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" dependencies = [ - "async-broadcast 0.7.0", + "async-broadcast", "async-executor", "async-fs 2.1.1", "async-io 2.3.1", @@ -12413,23 +12530,9 @@ dependencies = [ "uds_windows", "windows-sys 0.52.0", "xdg-home", - "zbus_macros 4.0.1", - "zbus_names 3.0.0", - "zvariant 4.0.2", -] - -[[package]] -name = "zbus_macros" -version = "3.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2207eb71efebda17221a579ca78b45c4c5f116f074eb745c3a172e688ccf89f5" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", - "zvariant_utils", + "zbus_macros", + "zbus_names", + "zvariant", ] [[package]] @@ -12446,17 +12549,6 @@ dependencies = [ "zvariant_utils", ] -[[package]] -name = "zbus_names" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" -dependencies = [ - "serde", - "static_assertions", - "zvariant 3.15.1", -] - [[package]] name = "zbus_names" version = "3.0.0" @@ -12465,7 +12557,7 @@ checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", - "zvariant 4.0.2", + "zvariant", ] [[package]] @@ -12709,18 +12801,27 @@ dependencies = [ ] [[package]] -name = "zvariant" -version = "3.15.1" +name = "zune-core" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b4fcf3660d30fc33ae5cd97e2017b23a96e85afd7a1dd014534cd0bf34ba67" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" dependencies = [ - "byteorder", - "enumflags2", - "libc", - "serde", - "static_assertions", - "url", - "zvariant_derive 3.15.1", + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" +dependencies = [ + "zune-core", ] [[package]] @@ -12733,20 +12834,8 @@ dependencies = [ "enumflags2", "serde", "static_assertions", - "zvariant_derive 4.0.2", -] - -[[package]] -name = "zvariant_derive" -version = "3.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0277758a8a0afc0e573e80ed5bfd9d9c2b48bd3108ffe09384f9f738c83f4a55" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "zvariant_utils", + "url", + "zvariant_derive", ] [[package]] diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml index 528e312574..210ba4129a 100644 --- a/crates/gpui/Cargo.toml +++ b/crates/gpui/Cargo.toml @@ -40,7 +40,7 @@ etagere = "0.2" futures.workspace = true font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5a5c4d4" } gpui_macros.workspace = true -image = "0.23" +image = "0.25" itertools.workspace = true lazy_static.workspace = true linkme = "0.3" @@ -54,7 +54,7 @@ profiling.workspace = true rand.workspace = true raw-window-handle = "0.6" refineable.workspace = true -resvg = "0.14" +resvg = "0.40" schemars.workspace = true seahash = "4.1" serde.workspace = true @@ -67,8 +67,6 @@ sum_tree.workspace = true taffy = { git = "https://github.com/DioxusLabs/taffy", rev = "1876f72bee5e376023eaa518aa7b8a34c769bd1b" } thiserror.workspace = true time.workspace = true -tiny-skia = "0.5" -usvg = { version = "0.14", features = [] } util.workspace = true uuid = { version = "1.1.2", features = ["v4", "v5"] } waker-fn = "1.1.0" @@ -78,7 +76,7 @@ backtrace = "0.3" collections = { workspace = true, features = ["test-support"] } util = { workspace = true, features = ["test-support"] } -[build-dependencies] +[target.'cfg(target_os = "macos")'.build-dependencies] bindgen = "0.65.1" cbindgen = "0.26.0" @@ -101,13 +99,15 @@ blade-graphics.workspace = true blade-macros.workspace = true blade-rwh.workspace = true bytemuck = "1" -cosmic-text = "0.10.0" +cosmic-text = "0.11.2" copypasta = "0.10.1" [target.'cfg(target_os = "linux")'.dependencies] -open = "5.0.1" -ashpd = "0.7.0" -x11rb = { version = "0.13.0", features = ["allow-unsafe-code", "xkb", "randr"] } +as-raw-xcb-connection = "1" +ashpd = "0.8.0" +calloop = "0.12.4" +calloop-wayland-source = "0.2.0" +wayland-backend = { version = "0.3.3", features = ["client_system"] } wayland-client = { version = "0.31.2" } wayland-cursor = "0.31.1" wayland-protocols = { version = "0.31.2", features = [ @@ -115,12 +115,10 @@ wayland-protocols = { version = "0.31.2", features = [ "staging", "unstable", ] } -wayland-backend = { version = "0.3.3", features = ["client_system"] } -xkbcommon = { version = "0.7", features = ["wayland", "x11"] } -as-raw-xcb-connection = "1" -calloop = "0.12.4" -calloop-wayland-source = "0.2.0" oo7 = "0.3.0" +open = "5.1.2" +x11rb = { version = "0.13.0", features = ["allow-unsafe-code", "xkb", "randr"] } +xkbcommon = { version = "0.7", features = ["wayland", "x11"] } [target.'cfg(windows)'.dependencies] windows.workspace = true diff --git a/crates/gpui/build.rs b/crates/gpui/build.rs index c9c483d6b4..1c87b391f6 100644 --- a/crates/gpui/build.rs +++ b/crates/gpui/build.rs @@ -1,186 +1,197 @@ #![cfg_attr(any(not(target_os = "macos"), feature = "macos-blade"), allow(unused))] -use std::{ - env, - path::{Path, PathBuf}, -}; - -use cbindgen::Config; - //TODO: consider generating shader code for WGSL //TODO: deprecate "runtime-shaders" and "macos-blade" fn main() { #[cfg(target_os = "macos")] - generate_dispatch_bindings(); - #[cfg(all(target_os = "macos", not(feature = "macos-blade")))] - let header_path = generate_shader_bindings(); - #[cfg(all(target_os = "macos", not(feature = "macos-blade")))] + macos::build(); +} + +#[cfg(target_os = "macos")] +mod macos { + use std::{ + env, + path::{Path, PathBuf}, + }; + + use cbindgen::Config; + + pub(super) fn build() { + generate_dispatch_bindings(); + #[cfg(not(feature = "macos-blade"))] + { + let header_path = generate_shader_bindings(); + + #[cfg(feature = "runtime_shaders")] + emit_stitched_shaders(&header_path); + #[cfg(not(feature = "runtime_shaders"))] + compile_metal_shaders(&header_path); + } + } + + fn generate_dispatch_bindings() { + println!("cargo:rustc-link-lib=framework=System"); + println!("cargo:rerun-if-changed=src/platform/mac/dispatch.h"); + + let bindings = bindgen::Builder::default() + .header("src/platform/mac/dispatch.h") + .allowlist_var("_dispatch_main_q") + .allowlist_var("_dispatch_source_type_data_add") + .allowlist_var("DISPATCH_QUEUE_PRIORITY_DEFAULT") + .allowlist_var("DISPATCH_QUEUE_PRIORITY_HIGH") + .allowlist_var("DISPATCH_TIME_NOW") + .allowlist_function("dispatch_get_global_queue") + .allowlist_function("dispatch_async_f") + .allowlist_function("dispatch_after_f") + .allowlist_function("dispatch_time") + .allowlist_function("dispatch_source_merge_data") + .allowlist_function("dispatch_source_create") + .allowlist_function("dispatch_source_set_event_handler_f") + .allowlist_function("dispatch_resume") + .allowlist_function("dispatch_suspend") + .allowlist_function("dispatch_source_cancel") + .allowlist_function("dispatch_set_context") + .parse_callbacks(Box::new(bindgen::CargoCallbacks)) + .layout_tests(false) + .generate() + .expect("unable to generate bindings"); + + let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + bindings + .write_to_file(out_path.join("dispatch_sys.rs")) + .expect("couldn't write dispatch bindings"); + } + + fn generate_shader_bindings() -> PathBuf { + let output_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("scene.h"); + let crate_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); + let mut config = Config::default(); + config.include_guard = Some("SCENE_H".into()); + config.language = cbindgen::Language::C; + config.export.include.extend([ + "Bounds".into(), + "Corners".into(), + "Edges".into(), + "Size".into(), + "Pixels".into(), + "PointF".into(), + "Hsla".into(), + "ContentMask".into(), + "Uniforms".into(), + "AtlasTile".into(), + "PathRasterizationInputIndex".into(), + "PathVertex_ScaledPixels".into(), + "ShadowInputIndex".into(), + "Shadow".into(), + "QuadInputIndex".into(), + "Underline".into(), + "UnderlineInputIndex".into(), + "Quad".into(), + "SpriteInputIndex".into(), + "MonochromeSprite".into(), + "PolychromeSprite".into(), + "PathSprite".into(), + "SurfaceInputIndex".into(), + "SurfaceBounds".into(), + "TransformationMatrix".into(), + ]); + config.no_includes = true; + config.enumeration.prefix_with_name = true; + + let mut builder = cbindgen::Builder::new(); + + let src_paths = [ + crate_dir.join("src/scene.rs"), + crate_dir.join("src/geometry.rs"), + crate_dir.join("src/color.rs"), + crate_dir.join("src/window.rs"), + crate_dir.join("src/platform.rs"), + crate_dir.join("src/platform/mac/metal_renderer.rs"), + ]; + for src_path in src_paths { + println!("cargo:rerun-if-changed={}", src_path.display()); + builder = builder.with_src(src_path); + } + + builder + .with_config(config) + .generate() + .expect("Unable to generate bindings") + .write_to_file(&output_path); + + output_path + } + + /// To enable runtime compilation, we need to "stitch" the shaders file with the generated header + /// so that it is self-contained. #[cfg(feature = "runtime_shaders")] - emit_stitched_shaders(&header_path); - #[cfg(all(target_os = "macos", not(feature = "macos-blade")))] + fn emit_stitched_shaders(header_path: &Path) { + use std::str::FromStr; + fn stitch_header(header: &Path, shader_path: &Path) -> std::io::Result { + let header_contents = std::fs::read_to_string(header)?; + let shader_contents = std::fs::read_to_string(shader_path)?; + let stitched_contents = format!("{header_contents}\n{shader_contents}"); + let out_path = + PathBuf::from(env::var("OUT_DIR").unwrap()).join("stitched_shaders.metal"); + std::fs::write(&out_path, stitched_contents)?; + Ok(out_path) + } + let shader_source_path = "./src/platform/mac/shaders.metal"; + let shader_path = PathBuf::from_str(shader_source_path).unwrap(); + stitch_header(header_path, &shader_path).unwrap(); + println!("cargo:rerun-if-changed={}", &shader_source_path); + } + #[cfg(not(feature = "runtime_shaders"))] - compile_metal_shaders(&header_path); -} + fn compile_metal_shaders(header_path: &Path) { + use std::process::{self, Command}; + let shader_path = "./src/platform/mac/shaders.metal"; + let air_output_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("shaders.air"); + let metallib_output_path = + PathBuf::from(env::var("OUT_DIR").unwrap()).join("shaders.metallib"); + println!("cargo:rerun-if-changed={}", shader_path); -fn generate_dispatch_bindings() { - println!("cargo:rustc-link-lib=framework=System"); - println!("cargo:rerun-if-changed=src/platform/mac/dispatch.h"); + let output = Command::new("xcrun") + .args([ + "-sdk", + "macosx", + "metal", + "-gline-tables-only", + "-mmacosx-version-min=10.15.7", + "-MO", + "-c", + shader_path, + "-include", + &header_path.to_str().unwrap(), + "-o", + ]) + .arg(&air_output_path) + .output() + .unwrap(); - let bindings = bindgen::Builder::default() - .header("src/platform/mac/dispatch.h") - .allowlist_var("_dispatch_main_q") - .allowlist_var("_dispatch_source_type_data_add") - .allowlist_var("DISPATCH_QUEUE_PRIORITY_DEFAULT") - .allowlist_var("DISPATCH_QUEUE_PRIORITY_HIGH") - .allowlist_var("DISPATCH_TIME_NOW") - .allowlist_function("dispatch_get_global_queue") - .allowlist_function("dispatch_async_f") - .allowlist_function("dispatch_after_f") - .allowlist_function("dispatch_time") - .allowlist_function("dispatch_source_merge_data") - .allowlist_function("dispatch_source_create") - .allowlist_function("dispatch_source_set_event_handler_f") - .allowlist_function("dispatch_resume") - .allowlist_function("dispatch_suspend") - .allowlist_function("dispatch_source_cancel") - .allowlist_function("dispatch_set_context") - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) - .layout_tests(false) - .generate() - .expect("unable to generate bindings"); + if !output.status.success() { + eprintln!( + "metal shader compilation failed:\n{}", + String::from_utf8_lossy(&output.stderr) + ); + process::exit(1); + } - let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); - bindings - .write_to_file(out_path.join("dispatch_sys.rs")) - .expect("couldn't write dispatch bindings"); -} + let output = Command::new("xcrun") + .args(["-sdk", "macosx", "metallib"]) + .arg(air_output_path) + .arg("-o") + .arg(metallib_output_path) + .output() + .unwrap(); -fn generate_shader_bindings() -> PathBuf { - let output_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("scene.h"); - let crate_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); - let mut config = Config::default(); - config.include_guard = Some("SCENE_H".into()); - config.language = cbindgen::Language::C; - config.export.include.extend([ - "Bounds".into(), - "Corners".into(), - "Edges".into(), - "Size".into(), - "Pixels".into(), - "PointF".into(), - "Hsla".into(), - "ContentMask".into(), - "Uniforms".into(), - "AtlasTile".into(), - "PathRasterizationInputIndex".into(), - "PathVertex_ScaledPixels".into(), - "ShadowInputIndex".into(), - "Shadow".into(), - "QuadInputIndex".into(), - "Underline".into(), - "UnderlineInputIndex".into(), - "Quad".into(), - "SpriteInputIndex".into(), - "MonochromeSprite".into(), - "PolychromeSprite".into(), - "PathSprite".into(), - "SurfaceInputIndex".into(), - "SurfaceBounds".into(), - "TransformationMatrix".into(), - ]); - config.no_includes = true; - config.enumeration.prefix_with_name = true; - - let mut builder = cbindgen::Builder::new(); - - let src_paths = [ - crate_dir.join("src/scene.rs"), - crate_dir.join("src/geometry.rs"), - crate_dir.join("src/color.rs"), - crate_dir.join("src/window.rs"), - crate_dir.join("src/platform.rs"), - crate_dir.join("src/platform/mac/metal_renderer.rs"), - ]; - for src_path in src_paths { - println!("cargo:rerun-if-changed={}", src_path.display()); - builder = builder.with_src(src_path); - } - - builder - .with_config(config) - .generate() - .expect("Unable to generate bindings") - .write_to_file(&output_path); - - output_path -} - -/// To enable runtime compilation, we need to "stitch" the shaders file with the generated header -/// so that it is self-contained. -#[cfg(feature = "runtime_shaders")] -fn emit_stitched_shaders(header_path: &Path) { - use std::str::FromStr; - fn stitch_header(header: &Path, shader_path: &Path) -> std::io::Result { - let header_contents = std::fs::read_to_string(header)?; - let shader_contents = std::fs::read_to_string(shader_path)?; - let stitched_contents = format!("{header_contents}\n{shader_contents}"); - let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("stitched_shaders.metal"); - std::fs::write(&out_path, stitched_contents)?; - Ok(out_path) - } - let shader_source_path = "./src/platform/mac/shaders.metal"; - let shader_path = PathBuf::from_str(shader_source_path).unwrap(); - stitch_header(header_path, &shader_path).unwrap(); - println!("cargo:rerun-if-changed={}", &shader_source_path); -} -#[cfg(not(feature = "runtime_shaders"))] -fn compile_metal_shaders(header_path: &Path) { - use std::process::{self, Command}; - let shader_path = "./src/platform/mac/shaders.metal"; - let air_output_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("shaders.air"); - let metallib_output_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("shaders.metallib"); - println!("cargo:rerun-if-changed={}", shader_path); - - let output = Command::new("xcrun") - .args([ - "-sdk", - "macosx", - "metal", - "-gline-tables-only", - "-mmacosx-version-min=10.15.7", - "-MO", - "-c", - shader_path, - "-include", - &header_path.to_str().unwrap(), - "-o", - ]) - .arg(&air_output_path) - .output() - .unwrap(); - - if !output.status.success() { - eprintln!( - "metal shader compilation failed:\n{}", - String::from_utf8_lossy(&output.stderr) - ); - process::exit(1); - } - - let output = Command::new("xcrun") - .args(["-sdk", "macosx", "metallib"]) - .arg(air_output_path) - .arg("-o") - .arg(metallib_output_path) - .output() - .unwrap(); - - if !output.status.success() { - eprintln!( - "metallib compilation failed:\n{}", - String::from_utf8_lossy(&output.stderr) - ); - process::exit(1); + if !output.status.success() { + eprintln!( + "metallib compilation failed:\n{}", + String::from_utf8_lossy(&output.stderr) + ); + process::exit(1); + } } } diff --git a/crates/gpui/src/assets.rs b/crates/gpui/src/assets.rs index e2667e67bb..37f67ed1bb 100644 --- a/crates/gpui/src/assets.rs +++ b/crates/gpui/src/assets.rs @@ -1,6 +1,6 @@ use crate::{size, DevicePixels, Result, SharedString, Size}; use anyhow::anyhow; -use image::{Bgra, ImageBuffer}; +use image::RgbaImage; use std::{ borrow::Cow, fmt, @@ -38,12 +38,12 @@ pub struct ImageId(usize); pub struct ImageData { /// The ID associated with this image pub id: ImageId, - data: ImageBuffer, Vec>, + data: RgbaImage, } impl ImageData { /// Create a new image from the given data. - pub fn new(data: ImageBuffer, Vec>) -> Self { + pub fn new(data: RgbaImage) -> Self { static NEXT_ID: AtomicUsize = AtomicUsize::new(0); Self { diff --git a/crates/gpui/src/image_cache.rs b/crates/gpui/src/image_cache.rs index b48701de8b..eb6aa42671 100644 --- a/crates/gpui/src/image_cache.rs +++ b/crates/gpui/src/image_cache.rs @@ -91,7 +91,7 @@ impl ImageCache { async move { match uri_or_path { UriOrPath::Path(uri) => { - let image = image::open(uri.as_ref())?.into_bgra8(); + let image = image::open(uri.as_ref())?.into_rgba8(); Ok(Arc::new(ImageData::new(image))) } UriOrPath::Uri(uri) => { @@ -110,7 +110,7 @@ impl ImageCache { let format = image::guess_format(&body)?; let image = image::load_from_memory_with_format(&body, format)? - .into_bgra8(); + .into_rgba8(); Ok(Arc::new(ImageData::new(image))) } } diff --git a/crates/gpui/src/platform/blade/blade_atlas.rs b/crates/gpui/src/platform/blade/blade_atlas.rs index 18c8a607b1..c2886f5cc0 100644 --- a/crates/gpui/src/platform/blade/blade_atlas.rs +++ b/crates/gpui/src/platform/blade/blade_atlas.rs @@ -159,7 +159,7 @@ impl BladeAtlasState { usage = gpu::TextureUsage::COPY | gpu::TextureUsage::RESOURCE; } AtlasTextureKind::Polychrome => { - format = gpu::TextureFormat::Bgra8Unorm; + format = gpu::TextureFormat::Rgba8Unorm; usage = gpu::TextureUsage::COPY | gpu::TextureUsage::RESOURCE; } AtlasTextureKind::Path => { diff --git a/crates/gpui/src/platform/linux/text_system.rs b/crates/gpui/src/platform/linux/text_system.rs index 7906a2f6fb..e1d5648c13 100644 --- a/crates/gpui/src/platform/linux/text_system.rs +++ b/crates/gpui/src/platform/linux/text_system.rs @@ -286,6 +286,7 @@ impl LinuxTextSystemState { params.glyph_id.0 as u16, (params.font_size * params.scale_factor).into(), (0.0, 0.0), + cosmic_text::CacheKeyFlags::empty(), ) .0, ) @@ -319,6 +320,7 @@ impl LinuxTextSystemState { params.glyph_id.0 as u16, (params.font_size * params.scale_factor).into(), (0.0, 0.0), + cosmic_text::CacheKeyFlags::empty(), ) .0, ) @@ -381,6 +383,7 @@ impl LinuxTextSystemState { font_size.0, f32::MAX, // We do our own wrapping cosmic_text::Wrap::None, + None, ); let mut runs = Vec::new(); diff --git a/crates/gpui/src/platform/mac/metal_atlas.rs b/crates/gpui/src/platform/mac/metal_atlas.rs index 7c23fafcba..ca03e08c12 100644 --- a/crates/gpui/src/platform/mac/metal_atlas.rs +++ b/crates/gpui/src/platform/mac/metal_atlas.rs @@ -115,7 +115,7 @@ impl MetalAtlasState { usage = metal::MTLTextureUsage::ShaderRead; } AtlasTextureKind::Polychrome => { - pixel_format = metal::MTLPixelFormat::BGRA8Unorm; + pixel_format = metal::MTLPixelFormat::RGBA8Unorm; usage = metal::MTLTextureUsage::ShaderRead; } AtlasTextureKind::Path => { diff --git a/crates/gpui/src/platform/mac/metal_renderer.rs b/crates/gpui/src/platform/mac/metal_renderer.rs index 92c9b57216..569227e081 100644 --- a/crates/gpui/src/platform/mac/metal_renderer.rs +++ b/crates/gpui/src/platform/mac/metal_renderer.rs @@ -72,7 +72,7 @@ impl MetalRenderer { let layer = metal::MetalLayer::new(); layer.set_device(&device); - layer.set_pixel_format(MTLPixelFormat::BGRA8Unorm); + layer.set_pixel_format(MTLPixelFormat::RGBA8Unorm); layer.set_opaque(true); layer.set_maximum_drawable_count(3); unsafe { @@ -128,7 +128,7 @@ impl MetalRenderer { "path_sprites", "path_sprite_vertex", "path_sprite_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let shadows_pipeline_state = build_pipeline_state( &device, @@ -136,7 +136,7 @@ impl MetalRenderer { "shadows", "shadow_vertex", "shadow_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let quads_pipeline_state = build_pipeline_state( &device, @@ -144,7 +144,7 @@ impl MetalRenderer { "quads", "quad_vertex", "quad_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let underlines_pipeline_state = build_pipeline_state( &device, @@ -152,7 +152,7 @@ impl MetalRenderer { "underlines", "underline_vertex", "underline_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let monochrome_sprites_pipeline_state = build_pipeline_state( &device, @@ -160,7 +160,7 @@ impl MetalRenderer { "monochrome_sprites", "monochrome_sprite_vertex", "monochrome_sprite_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let polychrome_sprites_pipeline_state = build_pipeline_state( &device, @@ -168,7 +168,7 @@ impl MetalRenderer { "polychrome_sprites", "polychrome_sprite_vertex", "polychrome_sprite_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let surfaces_pipeline_state = build_pipeline_state( &device, @@ -176,7 +176,7 @@ impl MetalRenderer { "surfaces", "surface_vertex", "surface_fragment", - MTLPixelFormat::BGRA8Unorm, + MTLPixelFormat::RGBA8Unorm, ); let command_queue = device.new_command_queue(); diff --git a/crates/gpui/src/platform/mac/text_system.rs b/crates/gpui/src/platform/mac/text_system.rs index d5bb723012..775359fd53 100644 --- a/crates/gpui/src/platform/mac/text_system.rs +++ b/crates/gpui/src/platform/mac/text_system.rs @@ -425,9 +425,8 @@ impl MacTextSystemState { ); if params.is_emoji { - // Convert from RGBA with premultiplied alpha to BGRA with straight alpha. + // Convert from RGBA with premultiplied alpha to RGBA with straight alpha. for pixel in bytes.chunks_exact_mut(4) { - pixel.swap(0, 2); let a = pixel[3] as f32 / 255.; pixel[0] = (pixel[0] as f32 / a) as u8; pixel[1] = (pixel[1] as f32 / a) as u8; diff --git a/crates/gpui/src/platform/windows/text_system.rs b/crates/gpui/src/platform/windows/text_system.rs index f68c74c7f7..5db1a0eea4 100644 --- a/crates/gpui/src/platform/windows/text_system.rs +++ b/crates/gpui/src/platform/windows/text_system.rs @@ -213,11 +213,19 @@ impl WindowsTextSystemState { _features: FontFeatures, ) -> Result> { let mut font_ids = SmallVec::new(); - let family = self + let families = self .font_system - .get_font_matches(Attrs::new().family(cosmic_text::Family::Name(name))); - for font in family.as_ref() { - let font = self.font_system.get_font(*font).unwrap(); + .db() + .faces() + .filter(|face| face.families.iter().any(|family| *name == family.0)) + .map(|face| (face.id, face.post_script_name.clone())) + .collect::>(); + + for (font_id, postscript_name) in families { + let font = self + .font_system + .get_font(font_id) + .ok_or_else(|| anyhow!("Could not load font"))?; // TODO: figure out why this is causing fluent icons from loading // if font.as_swash().charmap().map('m') == 0 { // self.font_system.db_mut().remove_face(font.id()); @@ -227,6 +235,8 @@ impl WindowsTextSystemState { let font_id = FontId(self.fonts.len()); font_ids.push(font_id); self.fonts.push(font); + self.postscript_names_by_font_id + .insert(font_id, postscript_name); } Ok(font_ids) } @@ -274,6 +284,7 @@ impl WindowsTextSystemState { params.glyph_id.0 as u16, (params.font_size * params.scale_factor).into(), (0.0, 0.0), + cosmic_text::CacheKeyFlags::empty(), ) .0, ) @@ -307,6 +318,7 @@ impl WindowsTextSystemState { params.glyph_id.0 as u16, (params.font_size * params.scale_factor).into(), (0.0, 0.0), + cosmic_text::CacheKeyFlags::empty(), ) .0, ) @@ -342,6 +354,7 @@ impl WindowsTextSystemState { font_size.0, f32::MAX, // todo(windows) we don't have a width cause this should technically not be wrapped I believe cosmic_text::Wrap::None, + None, ); let mut runs = Vec::new(); // todo(windows) what I think can happen is layout returns possibly multiple lines which means we should be probably working with it higher up in the text rendering diff --git a/crates/gpui/src/svg_renderer.rs b/crates/gpui/src/svg_renderer.rs index 978d5a626b..c1aa8881de 100644 --- a/crates/gpui/src/svg_renderer.rs +++ b/crates/gpui/src/svg_renderer.rs @@ -1,6 +1,9 @@ use crate::{AssetSource, DevicePixels, IsZero, Result, SharedString, Size}; use anyhow::anyhow; -use std::{hash::Hash, sync::Arc}; +use std::{ + hash::Hash, + sync::{Arc, OnceLock}, +}; #[derive(Clone, PartialEq, Hash, Eq)] pub(crate) struct RenderSvgParams { @@ -24,15 +27,19 @@ impl SvgRenderer { // Load the tree. let bytes = self.asset_source.load(¶ms.path)?; - let tree = usvg::Tree::from_data(&bytes, &usvg::Options::default())?; + let tree = + resvg::usvg::Tree::from_data(&bytes, &resvg::usvg::Options::default(), svg_fontdb())?; // Render the SVG to a pixmap with the specified width and height. let mut pixmap = - tiny_skia::Pixmap::new(params.size.width.into(), params.size.height.into()).unwrap(); + resvg::tiny_skia::Pixmap::new(params.size.width.into(), params.size.height.into()) + .unwrap(); + + let ratio = params.size.width.0 as f32 / tree.size().width(); resvg::render( &tree, - usvg::FitTo::Width(params.size.width.into()), - pixmap.as_mut(), + resvg::tiny_skia::Transform::from_scale(ratio, ratio), + &mut pixmap.as_mut(), ); // Convert the pixmap's pixels into an alpha mask. @@ -44,3 +51,13 @@ impl SvgRenderer { Ok(alpha_mask) } } + +/// Returns the global font database used for SVG rendering. +fn svg_fontdb() -> &'static resvg::usvg::fontdb::Database { + static FONTDB: OnceLock = OnceLock::new(); + FONTDB.get_or_init(|| { + let mut fontdb = resvg::usvg::fontdb::Database::new(); + fontdb.load_system_fonts(); + fontdb + }) +} diff --git a/crates/media/src/media.rs b/crates/media/src/media.rs index 8757249c31..8a71e28079 100644 --- a/crates/media/src/media.rs +++ b/crates/media/src/media.rs @@ -36,7 +36,7 @@ pub mod core_video { use super::*; pub use crate::bindings::{ - kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, + kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, kCVPixelFormatType_420YpCbCr8Planar, }; use crate::bindings::{kCVReturnSuccess, CVReturn, OSType};