diff --git a/Cargo.lock b/Cargo.lock old mode 100755 new mode 100644 index 46a2bf6fb..2711be35f --- a/Cargo.lock +++ b/Cargo.lock @@ -2,11 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ab_glyph" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe21446ad43aa56417a767f3e2f3d7c4ca522904de1dd640529a76e9c5c3b33c" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + [[package]] name = "ab_glyph_rasterizer" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "addr2line" @@ -36,52 +46,126 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] [[package]] -name = "andrew" -version = "0.3.1" +name = "android-activity" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" +checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" dependencies = [ + "android-properties", "bitflags", - "rusttype", - "walkdir", - "xdg", - "xml-rs", + "cc", + "jni-sys", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", ] [[package]] -name = "android_glue" -version = "0.2.3" +name = "android-properties" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" [[package]] -name = "async-trait" -version = "0.1.58" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "proc-macro2", - "quote", - "syn", + "libc", ] [[package]] -name = "atty" -version = "0.2.14" +name = "anstream" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "app_units" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc3ec9d4c47b25a5a9e5c848e053640331c7cedb1637434d75db68b79fee8a7f" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "ash" +version = "0.37.2+1.3.238" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28bf19c1f0a470be5fbf7522a308a05df06610252c5bcf5143e1b23f629a9a03" +dependencies = [ + "libloading", +] + +[[package]] +name = "async-trait" +version = "0.1.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.12", ] [[package]] @@ -100,7 +184,7 @@ dependencies = [ "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] @@ -113,15 +197,13 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "bindgen" -version = "0.60.1" +version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" +checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ "bitflags", "cexpr", "clang-sys", - "clap 3.2.23", - "env_logger", "lazy_static", "lazycell", "log", @@ -131,9 +213,25 @@ dependencies = [ "regex", "rustc-hash", "shlex", + "syn 1.0.109", "which", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -146,17 +244,50 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytemuck" -version = "1.12.3" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" +checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.12", +] [[package]] name = "byteorder" @@ -176,25 +307,31 @@ dependencies = [ [[package]] name = "bytes" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "calloop" -version = "0.6.5" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" +checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" dependencies = [ "log", - "nix 0.18.0", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", ] [[package]] name = "cc" -version = "1.0.74" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +dependencies = [ + "jobserver", +] [[package]] name = "cexpr" @@ -218,100 +355,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "cgl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" -dependencies = [ - "libc", -] - -[[package]] -name = "chunked_transfer" -version = "1.4.0" +name = "cfg_aliases" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "clang-sys" -version = "1.4.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", - "libloading 0.7.4", + "libloading", ] [[package]] name = "clap" -version = "3.2.23" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" dependencies = [ - "atty", - "bitflags", - "clap_lex 0.2.4", - "indexmap", - "strsim 0.10.0", - "termcolor", - "textwrap", + "clap_builder", + "clap_derive", + "once_cell", ] [[package]] -name = "clap" -version = "4.0.19" +name = "clap_builder" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e67816e006b17427c9b4386915109b494fec2d929c63e3bd3561234cbf1bf1e" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" dependencies = [ - "atty", + "anstream", + "anstyle", "bitflags", - "clap_derive", - "clap_lex 0.3.0", + "clap_lex", "once_cell", - "strsim 0.10.0", - "termcolor", + "strsim", ] [[package]] name = "clap_derive" -version = "4.0.18" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a1b0f6422af32d5da0c58e2703320f379216ee70198241c84173a8c5ac28f3" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.12", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] -name = "clap_lex" -version = "0.3.0" +name = "clipboard-win" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +checksum = "9fdf5e01086b6be750428ba4a40619f847eb2e95756eee84b18e06e5f0b50342" dependencies = [ - "os_str_bytes", + "lazy-bytes-cast", + "winapi 0.3.9", ] [[package]] -name = "clipboard-win" -version = "3.1.1" +name = "cmake" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fdf5e01086b6be750428ba4a40619f847eb2e95756eee84b18e06e5f0b50342" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ - "lazy-bytes-cast", - "winapi", + "cc", ] [[package]] @@ -323,8 +442,8 @@ dependencies = [ "bitflags", "block", "cocoa-foundation", - "core-foundation 0.9.3", - "core-graphics 0.22.3", + "core-foundation", + "core-graphics", "foreign-types", "libc", "objc", @@ -332,30 +451,55 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ "bitflags", "block", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "foreign-types", "libc", "objc", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "color_quant" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys", +] + [[package]] name = "copypasta" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7216b5c1e9ad3867252505995b02d01c6fa7e6db0d8abd42634352ef377777e" +checksum = "133fc8675ee3a4ec9aa513584deda9aa0faeda3586b87f7f0f2ba082c66fb172" dependencies = [ "clipboard-win", "objc", @@ -365,50 +509,22 @@ dependencies = [ "x11-clipboard", ] -[[package]] -name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -dependencies = [ - "core-foundation-sys 0.7.0", - "libc", -] - [[package]] name = "core-foundation" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "core-foundation-sys 0.8.3", + "core-foundation-sys", "libc", ] -[[package]] -name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "core-graphics" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" -dependencies = [ - "bitflags", - "core-foundation 0.7.0", - "foreign-types", - "libc", -] - [[package]] name = "core-graphics" version = "0.22.3" @@ -416,7 +532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation", "core-graphics-types", "foreign-types", "libc", @@ -429,22 +545,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", - "core-foundation 0.9.3", + "core-foundation", "foreign-types", "libc", ] [[package]] -name = "core-video-sys" -version = "0.1.4" +name = "core-text" +version = "19.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" dependencies = [ - "cfg-if 0.1.10", - "core-foundation-sys 0.7.0", - "core-graphics 0.19.2", + "core-foundation", + "core-graphics", + "foreign-types", "libc", - "objc", ] [[package]] @@ -456,25 +571,11 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -482,9 +583,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -493,32 +594,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.11" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "memoffset", + "memoffset 0.8.0", "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if 1.0.0", ] @@ -533,44 +624,14 @@ dependencies = [ ] [[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.9.3", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.10.2" +name = "d3d12" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" dependencies = [ - "darling_core", - "quote", - "syn", + "bitflags", + "libloading", + "winapi 0.3.9", ] [[package]] @@ -581,7 +642,7 @@ checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -607,7 +668,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -616,22 +677,13 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dlib" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" -dependencies = [ - "libloading 0.6.7", -] - [[package]] name = "dlib" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" dependencies = [ - "libloading 0.7.4", + "libloading", ] [[package]] @@ -646,54 +698,97 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi 0.3.9", + "wio", +] + [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] -name = "env_logger" -version = "0.9.2" +name = "enum-map" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae4f45fe23a1cad99d61617b3c9dbc19c905f2671b25d1e2714b4b221dc3605" +checksum = "988f0d17a0fa38291e5f41f71ea8d46a5d5497b9054d5a759fae2cbb819f2356" dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "enum-map-derive", ] [[package]] -name = "euclid" -version = "0.22.7" +name = "enum-map-derive" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b52c2ef4a78da0ba68fbe1fd920627411096d2ac478f7f4c9f3a54ba6705bade" +checksum = "2a4da76b3b6116d758c7ba93f7ec6a35d2e2cf24feda76c6e38a375f4d5c59f2" dependencies = [ - "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "filetime" -version = "0.2.18" +name = "errno" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" dependencies = [ - "cfg-if 1.0.0", + "errno-dragonfly", "libc", - "redox_syscall", "windows-sys", ] [[package]] -name = "flate2" -version = "1.0.24" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "crc32fast", - "miniz_oxide 0.5.4", + "cc", + "libc", +] + +[[package]] +name = "euclid" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "filetime" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.16", + "windows-sys", +] + +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide", ] [[package]] @@ -707,7 +802,7 @@ dependencies = [ "log", "rustversion", "thiserror", - "time", + "time 0.3.9", ] [[package]] @@ -719,12 +814,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foreign-types" version = "0.3.2" @@ -755,6 +844,62 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "freetype" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6" +dependencies = [ + "freetype-sys", + "libc", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", +] + +[[package]] +name = "fsevent" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" +dependencies = [ + "bitflags", + "fsevent-sys", +] + +[[package]] +name = "fsevent-sys" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" +dependencies = [ + "libc", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + [[package]] name = "futures" version = "0.1.31" @@ -763,9 +908,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -778,9 +923,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -788,15 +933,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -805,38 +950,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.12", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures 0.1.31", "futures-channel", @@ -852,6 +997,25 @@ dependencies = [ "tokio-io", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -876,9 +1040,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" [[package]] name = "gl" @@ -902,74 +1066,59 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] -name = "glutin" -version = "0.26.0" -source = "git+https://github.com/neovide/glutin?branch=new-keyboard-all#7c313d91584492961b9efab0d611e35b977c0fea" +name = "glow" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" dependencies = [ - "android_glue", - "cgl", - "cocoa", - "core-foundation 0.9.3", - "glutin_egl_sys", - "glutin_emscripten_sys", - "glutin_gles2_sys", - "glutin_glx_sys", - "glutin_wgl_sys", - "lazy_static", - "libloading 0.7.4", - "log", - "objc", - "osmesa-sys", - "parking_lot 0.11.2", - "wayland-client 0.28.6", - "wayland-egl", - "winapi", - "winit", + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "glutin_egl_sys" -version = "0.1.5" -source = "git+https://github.com/neovide/glutin?branch=new-keyboard-all#7c313d91584492961b9efab0d611e35b977c0fea" +name = "gpu-alloc" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d" dependencies = [ - "gl_generator", - "winapi", + "bitflags", + "gpu-alloc-types", ] [[package]] -name = "glutin_emscripten_sys" -version = "0.1.1" -source = "git+https://github.com/neovide/glutin?branch=new-keyboard-all#7c313d91584492961b9efab0d611e35b977c0fea" - -[[package]] -name = "glutin_gles2_sys" -version = "0.1.5" -source = "git+https://github.com/neovide/glutin?branch=new-keyboard-all#7c313d91584492961b9efab0d611e35b977c0fea" +name = "gpu-alloc-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" dependencies = [ - "gl_generator", - "objc", + "bitflags", ] [[package]] -name = "glutin_glx_sys" -version = "0.1.7" -source = "git+https://github.com/neovide/glutin?branch=new-keyboard-all#7c313d91584492961b9efab0d611e35b977c0fea" +name = "gpu-descriptor" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" dependencies = [ - "gl_generator", - "x11-dl", + "bitflags", + "gpu-descriptor-types", + "hashbrown", ] [[package]] -name = "glutin_wgl_sys" -version = "0.1.5" -source = "git+https://github.com/neovide/glutin?branch=new-keyboard-all#7c313d91584492961b9efab0d611e35b977c0fea" +name = "gpu-descriptor-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" dependencies = [ - "gl_generator", + "bitflags", ] [[package]] @@ -983,30 +1132,40 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" dependencies = [ "libc", ] [[package]] -name = "humantime" -version = "2.1.0" +name = "hermit-abi" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] -name = "ident_case" -version = "1.0.1" +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "hotwatch" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "39301670a6f5798b75f36a1b149a379a50df5aa7c71be50f4b41ec6eab445cb8" +dependencies = [ + "log", + "notify", +] [[package]] name = "idna" @@ -1020,9 +1179,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c" +checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" dependencies = [ "bytemuck", "byteorder", @@ -1034,14 +1193,34 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", ] +[[package]] +name = "inotify" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" +dependencies = [ + "bitflags", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "instant" version = "0.1.12" @@ -1049,6 +1228,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys", ] [[package]] @@ -1060,6 +1253,18 @@ dependencies = [ "libc", ] +[[package]] +name = "is-terminal" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys", +] + [[package]] name = "itertools" version = "0.10.5" @@ -1071,9 +1276,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jni-sys" @@ -1081,15 +1286,45 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "khronos-egl" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + [[package]] name = "khronos_api" version = "3.1.0" @@ -1116,29 +1351,25 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libloading" -version = "0.6.7" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if 1.0.0", - "winapi", + "winapi 0.3.9", ] [[package]] -name = "libloading" -version = "0.7.4" +name = "linux-raw-sys" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" [[package]] name = "lock_api" @@ -1178,19 +1409,21 @@ dependencies = [ ] [[package]] -name = "memchr" -version = "2.5.0" +name = "malloc_size_of_derive" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "632647502a8bfa82458c07134791fffa7a719f00427d1afd79c3cb6d4960a982" +dependencies = [ + "proc-macro2", + "syn 1.0.109", + "synstructure", +] [[package]] -name = "memmap2" -version = "0.1.0" +name = "memchr" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" -dependencies = [ - "libc", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" @@ -1203,9 +1436,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] @@ -1220,20 +1453,34 @@ dependencies = [ ] [[package]] -name = "minimal-lexical" -version = "0.2.1" +name = "memoffset" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg", +] [[package]] -name = "miniz_oxide" -version = "0.5.4" +name = "metal" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" dependencies = [ - "adler", + "bitflags", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.6.2" @@ -1245,22 +1492,28 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", "libc", "log", "miow", - "ntapi", - "winapi", + "net2", + "slab", + "winapi 0.2.8", ] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", @@ -1269,31 +1522,34 @@ dependencies = [ ] [[package]] -name = "mio-misc" -version = "1.2.2" +name = "mio-extras" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47412f3a52115b936ff2a229b803498c7b4d332adeb87c2f1498c9da54c398c" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ - "crossbeam", - "crossbeam-queue", + "lazycell", "log", - "mio 0.7.14", + "mio 0.6.23", + "slab", ] [[package]] name = "miow" -version = "0.3.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" dependencies = [ - "winapi", + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", ] [[package]] name = "mockall" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if 1.0.0", "downcast", @@ -1306,14 +1562,34 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "naga" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" +dependencies = [ + "bit-set", + "bitflags", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "num-traits", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", ] [[package]] @@ -1324,67 +1600,53 @@ checksum = "9ce8b389a86cabeb0d8b33a61e60f3cbb4de38914342fe274e69111f3b5d9c44" [[package]] name = "ndk" -version = "0.3.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ + "bitflags", "jni-sys", "ndk-sys", "num_enum", + "raw-window-handle", "thiserror", ] [[package]] -name = "ndk-glue" -version = "0.3.0" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk", - "ndk-macro", - "ndk-sys", -] +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] -name = "ndk-macro" -version = "0.2.0" +name = "ndk-sys" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ - "darling", - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", + "jni-sys", ] -[[package]] -name = "ndk-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" - [[package]] name = "neovide" version = "0.10.3" dependencies = [ "async-trait", "backtrace", + "bytemuck", "cfg-if 1.0.0", - "clap 4.0.19", + "clap", "cocoa", "copypasta", "csscolorparser", "derive-new", "dirs", + "enum-map", "euclid", "flexi_logger", - "futures 0.3.25", + "futures 0.3.28", "gl", - "glutin", + "hotwatch", "image", "itertools", "lazy_static", @@ -1392,25 +1654,33 @@ dependencies = [ "lru", "mockall", "neovide-derive", + "num_cpus", "nvim-rs", "objc", - "parking_lot 0.12.1", + "parking_lot", "pin-project", + "pollster", "rand 0.8.5", + "rayon", "rmpv", "serde", "serde_json", "shlex", + "simple_moving_average", "skia-safe", "swash", - "time", + "time 0.3.9", "tokio", "tokio-util", + "tracy-client-sys", "unicode-segmentation", + "webrender_api", + "wgpu", "which", - "winapi", + "winapi 0.3.9", "winit", "winres", + "wr_glyph_rasterizer", "xdg", ] @@ -1419,50 +1689,50 @@ name = "neovide-derive" version = "0.1.0" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] -name = "nix" -version = "0.18.0" +name = "net2" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" dependencies = [ - "bitflags", - "cc", "cfg-if 0.1.10", "libc", + "winapi 0.3.9", ] [[package]] name = "nix" -version = "0.20.0" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags", - "cc", "cfg-if 1.0.0", "libc", + "memoffset 0.6.5", ] [[package]] name = "nix" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ + "autocfg", "bitflags", "cfg-if 1.0.0", "libc", - "memoffset", + "memoffset 0.6.5", ] [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -1475,12 +1745,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "ntapi" -version = "0.3.7" +name = "notify" +version = "4.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" +checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" dependencies = [ - "winapi", + "bitflags", + "filetime", + "fsevent", + "fsevent-sys", + "inotify", + "libc", + "mio 0.6.23", + "mio-extras", + "walkdir", + "winapi 0.3.9", ] [[package]] @@ -1515,33 +1794,33 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "num_enum" -version = "0.5.7" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate 1.2.1", + "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1560,7 +1839,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e98dcbd3b0ece3cf2b76ebc1e33e6511777ea7322884f4b7150cbc253afa37e" dependencies = [ "async-trait", - "futures 0.3.25", + "futures 0.3.28", "log", "parity-tokio-ipc", "rmp", @@ -1576,6 +1855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", + "objc_exception", ] [[package]] @@ -1589,6 +1869,41 @@ dependencies = [ "objc_id", ] +[[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe31e5425d3d0b89a15982c024392815da40689aceb34bad364d58732bcfd649" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + [[package]] name = "objc_id" version = "0.1.1" @@ -1600,39 +1915,36 @@ dependencies = [ [[package]] name = "object" -version = "0.30.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.16.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] -name = "os_str_bytes" -version = "6.3.1" +name = "orbclient" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9" - -[[package]] -name = "osmesa-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" +checksum = "974465c5e83cf9df05c1e4137b271d29035c902e39e5ad4c1939837e22160af8" dependencies = [ - "shared_library", + "cfg-if 1.0.0", + "redox_syscall 0.2.16", + "wasm-bindgen", + "web-sys", ] [[package]] name = "owned_ttf_parser" -version = "0.15.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" +checksum = "e25e9fb15717794fae58ab55c26e044103aad13186fbb625893f9a3bbcc24228" dependencies = [ "ttf-parser", ] @@ -1643,23 +1955,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6" dependencies = [ - "futures 0.3.25", + "futures 0.3.28", "libc", "log", "rand 0.7.3", "tokio", - "winapi", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", + "winapi 0.3.9", ] [[package]] @@ -1669,41 +1970,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.4", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if 1.0.0", - "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", - "winapi", + "windows-sys", ] [[package]] -name = "parking_lot_core" -version = "0.9.4" +name = "paste" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" + +[[package]] +name = "peek-poke" +version = "0.3.0" +source = "git+https://github.com/servo/webrender#b020fe0e11f5b5fd39a3a95571663ca8893873fc" dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", + "euclid", + "peek-poke-derive", ] [[package]] -name = "paste" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +name = "peek-poke-derive" +version = "0.3.0" +source = "git+https://github.com/servo/webrender#b020fe0e11f5b5fd39a3a95571663ca8893873fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", + "unicode-xid", +] [[package]] name = "peeking_take_while" @@ -1747,7 +2055,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1776,7 +2084,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1806,9 +2114,15 @@ dependencies = [ "bitflags", "crc32fast", "flate2", - "miniz_oxide 0.6.2", + "miniz_oxide", ] +[[package]] +name = "pollster" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1817,9 +2131,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "2.1.2" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab68289ded120dcbf9d571afcf70163233229052aec9b08ab09532f698d0e1e6" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", @@ -1831,15 +2145,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e7125585d872860e9955ca571650b27a4979c5823084168c5ed5bbfb016b56" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad3f7fa8d61e139cbc7c3edfebf3b6678883a53f5ffac65d1259329a93ee43a5" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -1847,71 +2161,34 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534" dependencies = [ "unicode-ident", ] [[package]] -name = "quick-xml" -version = "0.22.0" +name = "profiling" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8533f14c8382aaad0d592c812ac3b826162128b65662331e1127b45c3d18536b" -dependencies = [ - "memchr", -] +checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" [[package]] name = "quote" -version = "1.0.21" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -1987,23 +2264,38 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "range-alloc" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" + [[package]] name = "raw-window-handle" -version = "0.3.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "libc", - "raw-window-handle 0.4.3", + "either", + "rayon-core", ] [[package]] -name = "raw-window-handle" -version = "0.4.3" +name = "rayon-core" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ - "cty", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", ] [[package]] @@ -2015,6 +2307,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -2022,15 +2323,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.8", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.0" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -2039,9 +2340,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "renderdoc-sys" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" [[package]] name = "ring" @@ -2055,7 +2362,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2081,9 +2388,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustc-hash" @@ -2092,38 +2399,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "rustls" -version = "0.20.7" +name = "rustix" +version = "0.37.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "d097081ed288dfe45699b72f5b5d648e5f15d64d900c7080273baa20c16a6849" dependencies = [ - "log", - "ring", - "sct", - "webpki", + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] -name = "rusttype" -version = "0.9.3" +name = "rustls" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff8374aa04134254b7995b63ad3dc41c7f7236f69528b28553da7d72efaa967" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser", + "log", + "ring", + "sct", + "webpki", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "same-file" @@ -2156,31 +2467,53 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sctk-adwaita" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc56402866c717f54e48b122eb93c69f709bc5a6359c403598992fd92f017931" +dependencies = [ + "ab_glyph", + "log", + "memmap2 0.5.10", + "smithay-client-toolkit", + "tiny-skia", +] + [[package]] name = "serde" -version = "1.0.147" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.12", ] [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", @@ -2188,13 +2521,12 @@ dependencies = [ ] [[package]] -name = "shared_library" -version = "0.1.9" +name = "serde_spanned" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" +checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" dependencies = [ - "lazy_static", - "libc", + "serde", ] [[package]] @@ -2205,13 +2537,22 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] +[[package]] +name = "simple_moving_average" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd19d3808aad2604c824399fd270260d634678b010328c9d96851bb0fb63121" +dependencies = [ + "num-traits", +] + [[package]] name = "siphasher" version = "0.3.10" @@ -2220,9 +2561,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "skia-bindings" -version = "0.52.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f249be649ae13f65934370168f742a7be27096f432f15572fb70f5367916b8f" +checksum = "52d166792c15b8ebd180b83e3b9ab38ef69c09468ed26c11692fb59c5af9bc1d" dependencies = [ "bindgen", "cc", @@ -2232,15 +2573,15 @@ dependencies = [ "regex", "serde_json", "tar", - "toml", + "toml 0.7.3", "ureq", ] [[package]] name = "skia-safe" -version = "0.52.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5036fc8c167b0e1886aba4f924781d8589e67e5f43bfc3af09d5c9eda4d21940" +checksum = "5fee050b67b2124a5745484f4216999951feeeb1577ef1515e9194ea6d9a9612" dependencies = [ "bitflags", "lazy_static", @@ -2249,37 +2590,27 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] [[package]] -name = "smallvec" -version = "1.10.0" +name = "slotmap" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] [[package]] -name = "smithay-client-toolkit" -version = "0.12.3" +name = "smallvec" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" -dependencies = [ - "andrew", - "bitflags", - "calloop", - "dlib 0.4.2", - "lazy_static", - "log", - "memmap2 0.1.0", - "nix 0.18.0", - "wayland-client 0.28.6", - "wayland-cursor 0.28.6", - "wayland-protocols 0.28.6", -] +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "smithay-client-toolkit" @@ -2288,15 +2619,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ "bitflags", - "dlib 0.5.0", + "calloop", + "dlib", "lazy_static", "log", - "memmap2 0.5.7", - "nix 0.24.2", + "memmap2 0.5.10", + "nix 0.24.3", "pkg-config", - "wayland-client 0.29.5", - "wayland-cursor 0.29.5", - "wayland-protocols 0.29.5", + "wayland-client", + "wayland-cursor", + "wayland-protocols", ] [[package]] @@ -2305,18 +2637,18 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" dependencies = [ - "smithay-client-toolkit 0.16.0", - "wayland-client 0.29.5", + "smithay-client-toolkit", + "wayland-client", ] [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2326,10 +2658,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "strsim" -version = "0.9.3" +name = "spirv" +version = "0.2.0+1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +dependencies = [ + "bitflags", + "num-traits", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +checksum = "9df65f20698aeed245efdde3628a6b559ea1239bbb871af1b6e3b58c413b2bd1" [[package]] name = "strsim" @@ -2339,9 +2687,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "swash" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1bdb2004b76b5f5f3afe722d70b1aea160d2362cb7e40716a7106197ee7f82d" +checksum = "8bb18e5888a9b5f0a89ea3ebdf6883dc479347ca9183b6c51a8f9cf2041f23a0" dependencies = [ "yazi", "zeno", @@ -2349,15 +2697,38 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.103" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + [[package]] name = "tar" version = "0.4.38" @@ -2371,48 +2742,53 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "termtree" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" - -[[package]] -name = "textwrap" -version = "0.16.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.12", ] [[package]] name = "time" -version = "0.3.9" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", +] + +[[package]] +name = "time" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ @@ -2428,6 +2804,31 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +[[package]] +name = "tiny-skia" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfef3412c6975196fdfac41ef232f910be2bb37b9dd3313a49a1a6bc815a5bdb" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if 1.0.0", + "png", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b5edac058fc98f51c935daea4d805b695b38e2f151241cad125ade2a2ac20d" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2439,23 +2840,22 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", - "bytes 1.2.1", + "bytes 1.4.0", "libc", - "memchr", - "mio 0.8.5", + "mio 0.8.6", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -2476,22 +2876,22 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.12", ] [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ - "bytes 1.2.1", + "bytes 1.4.0", "futures-core", "futures-io", "futures-sink", @@ -2501,30 +2901,79 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracy-client-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcbdba03a3cfc5f757469fd5b6d795fc461484c97e47e94b0fc7db93261d9c5" +dependencies = [ + "cc", +] + +[[package]] +name = "tracy-rs" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce607aae8ab0ab3abf3a2723a9ab6f09bb8639ed83fdd888d857b8e556c868d8" + [[package]] name = "ttf-parser" -version = "0.15.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" +checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -2537,9 +2986,21 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "untrusted" @@ -2549,12 +3010,11 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "ureq" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" +checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" dependencies = [ "base64", - "chunked_transfer", "flate2", "log", "once_cell", @@ -2575,6 +3035,18 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.4" @@ -2583,12 +3055,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -2598,6 +3069,12 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2606,9 +3083,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -2616,24 +3093,36 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2641,38 +3130,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" - -[[package]] -name = "wayland-client" -version = "0.28.6" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ab332350e502f159382201394a78e3cc12d0f04db863429260164ea40e0355" -dependencies = [ - "bitflags", - "downcast-rs", - "libc", - "nix 0.20.0", - "scoped-tls", - "wayland-commons 0.28.6", - "wayland-scanner 0.28.6", - "wayland-sys 0.28.6", -] +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wayland-client" @@ -2683,23 +3156,11 @@ dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.24.2", + "nix 0.24.3", "scoped-tls", - "wayland-commons 0.29.5", - "wayland-scanner 0.29.5", - "wayland-sys 0.29.5", -] - -[[package]] -name = "wayland-commons" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21817947c7011bbd0a27e11b17b337bfd022e8544b071a2641232047966fbda" -dependencies = [ - "nix 0.20.0", - "once_cell", - "smallvec", - "wayland-sys 0.28.6", + "wayland-commons", + "wayland-scanner", + "wayland-sys", ] [[package]] @@ -2708,21 +3169,10 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" dependencies = [ - "nix 0.24.2", + "nix 0.24.3", "once_cell", "smallvec", - "wayland-sys 0.29.5", -] - -[[package]] -name = "wayland-cursor" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be610084edd1586d45e7bdd275fe345c7c1873598caa464c4fb835dee70fa65a" -dependencies = [ - "nix 0.20.0", - "wayland-client 0.28.6", - "xcursor", + "wayland-sys", ] [[package]] @@ -2731,33 +3181,11 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ - "nix 0.24.2", - "wayland-client 0.29.5", + "nix 0.24.3", + "wayland-client", "xcursor", ] -[[package]] -name = "wayland-egl" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ba1ab1e18756b23982d36f08856d521d7df45015f404a2d7c4f0b2d2f66956" -dependencies = [ - "wayland-client 0.28.6", - "wayland-sys 0.28.6", -] - -[[package]] -name = "wayland-protocols" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286620ea4d803bacf61fa087a4242ee316693099ee5a140796aaba02b29f861f" -dependencies = [ - "bitflags", - "wayland-client 0.28.6", - "wayland-commons 0.28.6", - "wayland-scanner 0.28.6", -] - [[package]] name = "wayland-protocols" version = "0.29.5" @@ -2765,20 +3193,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ "bitflags", - "wayland-client 0.29.5", - "wayland-commons 0.29.5", - "wayland-scanner 0.29.5", -] - -[[package]] -name = "wayland-scanner" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce923eb2deb61de332d1f356ec7b6bf37094dc5573952e1c8936db03b54c03f1" -dependencies = [ - "proc-macro2", - "quote", - "xml-rs", + "wayland-client", + "wayland-commons", + "wayland-scanner", ] [[package]] @@ -2792,33 +3209,22 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "wayland-sys" -version = "0.28.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d841fca9aed7febf9bed2e9796c49bf58d4152ceda8ac949ebe00868d8f0feb8" -dependencies = [ - "dlib 0.5.0", - "lazy_static", - "pkg-config", -] - [[package]] name = "wayland-sys" version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" dependencies = [ - "dlib 0.5.0", + "dlib", "lazy_static", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -2836,24 +3242,143 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] +[[package]] +name = "webrender_api" +version = "0.62.0" +source = "git+https://github.com/servo/webrender#b020fe0e11f5b5fd39a3a95571663ca8893873fc" +dependencies = [ + "app_units", + "bitflags", + "byteorder", + "crossbeam-channel", + "euclid", + "malloc_size_of_derive", + "peek-poke", + "serde", + "serde_bytes", + "serde_derive", + "time 0.1.45", + "wr_malloc_size_of", +] + +[[package]] +name = "wgpu" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f643110d228fd62a60c5ed2ab56c4d5b3704520bd50561174ec4ec74932937" +dependencies = [ + "arrayvec", + "js-sys", + "log", + "naga", + "parking_lot", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6000d1284ef8eec6076fd5544a73125fd7eb9b635f18dceeb829d826f41724ca" +dependencies = [ + "arrayvec", + "bit-vec", + "bitflags", + "cfg_aliases", + "codespan-reporting", + "fxhash", + "log", + "naga", + "parking_lot", + "profiling", + "raw-window-handle", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags", + "block", + "core-graphics-types", + "d3d12", + "foreign-types", + "fxhash", + "glow", + "gpu-alloc", + "gpu-descriptor", + "js-sys", + "khronos-egl", + "libloading", + "log", + "metal", + "naga", + "objc", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle", + "renderdoc-sys", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi 0.3.9", +] + +[[package]] +name = "wgpu-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" +dependencies = [ + "bitflags", +] + [[package]] name = "which" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", "libc", "once_cell", ] +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -2864,6 +3389,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2876,7 +3407,16 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi 0.3.9", ] [[package]] @@ -2887,9 +3427,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -2902,129 +3451,205 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winit" -version = "0.24.0" -source = "git+https://github.com/neovide/winit?branch=new-keyboard-all#27967af60d408218529255e897964b6cffd94659" +version = "0.28.1" +source = "git+https://github.com/neovide/winit?branch=new-keyboard-v3#4a566b72bcd8a4b7fefff3f278f0c0b485e899b0" dependencies = [ + "android-activity", "bitflags", - "cocoa", - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "core-video-sys", + "cfg_aliases", + "core-foundation", + "core-graphics", "dispatch", "instant", - "lazy_static", "libc", "log", "memmap2 0.2.3", - "mio 0.7.14", - "mio-misc", + "mio 0.8.6", "nameof", "ndk", - "ndk-glue", "ndk-sys", - "objc", - "parking_lot 0.11.2", + "objc2", + "once_cell", + "orbclient", "percent-encoding", - "raw-window-handle 0.3.4", - "scopeguard", + "raw-window-handle", + "redox_syscall 0.3.5", + "sctk-adwaita", "serde", - "smithay-client-toolkit 0.12.3", + "smithay-client-toolkit", "unicode-segmentation", - "wayland-client 0.28.6", - "winapi", + "wasm-bindgen", + "wayland-client", + "wayland-commons", + "wayland-protocols", + "wayland-scanner", + "web-sys", + "windows-sys", "x11-dl", "xkbcommon-dl", ] +[[package]] +name = "winnow" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +dependencies = [ + "memchr", +] + [[package]] name = "winres" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" dependencies = [ - "toml", + "toml 0.5.11", +] + +[[package]] +name = "wio" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "wr_glyph_rasterizer" +version = "0.1.0" +source = "git+https://github.com/servo/webrender#b020fe0e11f5b5fd39a3a95571663ca8893873fc" +dependencies = [ + "core-foundation", + "core-graphics", + "core-text", + "dwrote", + "euclid", + "freetype", + "fxhash", + "lazy_static", + "libc", + "log", + "malloc_size_of_derive", + "objc", + "rayon", + "smallvec", + "tracy-rs", + "webrender_api", + "wr_malloc_size_of", +] + +[[package]] +name = "wr_malloc_size_of" +version = "0.0.2" +source = "git+https://github.com/servo/webrender#b020fe0e11f5b5fd39a3a95571663ca8893873fc" +dependencies = [ + "app_units", + "euclid", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "x11-clipboard" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a7468a5768fea473e6c8c0d4b60d6d7001a64acceaac267207ca0281e1337e8" +checksum = "980b9aa9226c3b7de8e2adb11bf20124327c054e0e5812d2aac0b5b5a87e7464" dependencies = [ - "xcb", + "x11rb", ] [[package]] name = "x11-dl" -version = "2.20.0" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c83627bc137605acc00bb399c7b908ef460b621fc37c953db2b09f88c449ea6" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" dependencies = [ - "lazy_static", "libc", + "once_cell", "pkg-config", ] [[package]] -name = "xattr" -version = "0.2.3" +name = "x11rb" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" dependencies = [ - "libc", + "gethostname", + "nix 0.24.3", + "winapi 0.3.9", + "winapi-wsapoll", + "x11rb-protocol", ] [[package]] -name = "xcb" -version = "1.2.0" +name = "x11rb-protocol" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0faeb4d7e2d54fff4a0584f61297e86b106914af2029778de7b427f72564d6c5" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +dependencies = [ + "nix 0.24.3", +] + +[[package]] +name = "xattr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ - "bitflags", "libc", - "quick-xml", ] [[package]] @@ -3051,7 +3676,7 @@ version = "0.1.0" source = "git+https://github.com/maroider/xkbcommon-dl?rev=900832888ad6f11011d1369befb344a9aa8a9610#900832888ad6f11011d1369befb344a9aa8a9610" dependencies = [ "bitflags", - "dlib 0.5.0", + "dlib", "lazy_static", "log", "x11-dl", diff --git a/Cargo.toml b/Cargo.toml index c31809e9d..a47a95d63 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,15 @@ members = ["neovide-derive"] [features] default = [] embed-fonts = [] +profiling = ["dep:tracy-client-sys"] +gpu_profiling = ["profiling"] [dependencies] -copypasta = "0.8.1" async-trait = "0.1.53" backtrace = "0.3.67" cfg-if = "1.0.0" clap = { version = "4.0.8", features = ["cargo", "derive", "env"] } +copypasta = "0.8.1" csscolorparser = "0.6.2" derive-new = "0.5.9" dirs = "4.0.0" @@ -27,7 +29,6 @@ euclid = "0.22.7" flexi_logger = { version = "0.22.3", default-features = false } futures = "0.3.21" gl = "0.14.0" -glutin = { git = "https://github.com/neovide/glutin", branch = "new-keyboard-all", features = ["serde"] } image = { version = "0.24.1", default-features = false, features = ["ico"] } itertools = "0.10.5" lazy_static = "1.4.0" @@ -41,14 +42,26 @@ rand = "0.8.5" rmpv = "1.0.0" serde = { version = "1.0.136", features = ["derive"] } serde_json = "1.0.79" +simple_moving_average = "0.1.2" swash = "0.1.4" time = "0.3.9" tokio = { version = "1.25.0", features = ["full"] } tokio-util = { version = "0.7.4", features = ["compat"] } +tracy-client-sys = { version = "0.19.0", optional = true } unicode-segmentation = "1.9.0" which = "4.2.5" -winit = { git = "https://github.com/neovide/winit", branch = "new-keyboard-all" } +winit = { git = "https://github.com/neovide/winit", branch = "new-keyboard-v3", features = ["serde"]} xdg = "2.4.1" +wgpu = "0.14.2" +skia-safe = "0.60.0" +pollster = "0.3.0" +bytemuck = { version = "1.12", features = [ "derive" ] } +wr_glyph_rasterizer = { git = "https://github.com/servo/webrender", version = "0.1.0", ref="6e043ad24b6305e34960511dade7f526e48fff99"} +webrender_api = { git = "https://github.com/servo/webrender", version = "0.62.0", ref="6e043ad24b6305e34960511dade7f526e48fff99" } +rayon = "1.7.0" +num_cpus = "1.15.0" +enum-map = "2.5.0" +hotwatch = "0.4.6" [dev-dependencies] mockall = "0.11.0" @@ -56,27 +69,26 @@ mockall = "0.11.0" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3.9", features = ["winuser"] } -[target.'cfg(windows)'.build-dependencies] -winres = "0.1.12" - -[target.'cfg(linux)'.dependencies.skia-safe] -features = ["gl", "egl"] -version = "0.52.0" - -[target.'cfg(not(linux))'.dependencies.skia-safe] -features = ["gl"] -version = "0.52.0" - [target.'cfg(target_os = "macos")'.dependencies] cocoa = "0.24.0" objc = "0.2.7" shlex = "1.1.0" +[target.'cfg(not(windows))'.dependencies] + +[target.'cfg(windows)'.build-dependencies] +winres = "0.1.12" + [profile.release] lto = true incremental = true strip = true +[profile.profiling] +inherits = "release" +strip = false +debug = true + [package.metadata.bundle] name = "Neovide" identifier = "com.neovide.neovide" diff --git a/src/bridge/events.rs b/src/bridge/events.rs index cbcadd9f8..2d15b5dc1 100644 --- a/src/bridge/events.rs +++ b/src/bridge/events.rs @@ -4,9 +4,9 @@ use std::{ fmt::{self, Debug}, }; +use csscolorparser::Color; use log::debug; use rmpv::Value; -use skia_safe::Color4f; use crate::editor::{Colors, CursorMode, CursorShape, Style, UnderlineStyle}; @@ -276,17 +276,12 @@ pub enum RedrawEvent { }, } -fn unpack_color(packed_color: u64) -> Color4f { +fn unpack_color(packed_color: u64) -> Color { let packed_color = packed_color as u32; - let r = ((packed_color & 0x00ff_0000) >> 16) as f32; - let g = ((packed_color & 0xff00) >> 8) as f32; - let b = (packed_color & 0xff) as f32; - Color4f { - r: r / 255.0, - g: g / 255.0, - b: b / 255.0, - a: 1.0, - } + let r = ((packed_color & 0x00ff_0000) >> 16) as u8; + let g = ((packed_color & 0xff00) >> 8) as u8; + let b = (packed_color & 0xff) as u8; + Color::from_rgba8(r, g, b, 255) } fn extract_values(values: Vec) -> Result<[Value; REQ]> { diff --git a/src/dimensions.rs b/src/dimensions.rs index 6b36e0401..9122f55a1 100644 --- a/src/dimensions.rs +++ b/src/dimensions.rs @@ -4,11 +4,13 @@ use std::{ str::FromStr, }; -use glutin::dpi::PhysicalSize; use serde::{Deserialize, Serialize}; +use winit::dpi::PhysicalSize; use crate::settings; +use euclid::default::Size2D; + // Maybe this should be independent from serialization? #[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] pub struct Dimensions { @@ -83,6 +85,22 @@ impl From for PhysicalSize { } } +macro_rules! impl_from_dimensions_to_size2d { + ($type:ty) => { + impl From for Size2D<$type> { + fn from(dimensions: Dimensions) -> Size2D<$type> { + Size2D::new(dimensions.width as $type, dimensions.height as $type) + } + } + }; +} + +impl_from_dimensions_to_size2d!(u64); +impl_from_dimensions_to_size2d!(u32); +impl_from_dimensions_to_size2d!(i32); +impl_from_dimensions_to_size2d!(f32); +impl_from_dimensions_to_size2d!(f64); + impl Mul for Dimensions { type Output = Self; diff --git a/src/editor/cursor.rs b/src/editor/cursor.rs index a5bbfa797..d347fa759 100644 --- a/src/editor/cursor.rs +++ b/src/editor/cursor.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, sync::Arc}; -use skia_safe::Color4f; +use csscolorparser::Color; use crate::editor::style::{Colors, Style}; @@ -66,18 +66,18 @@ impl Cursor { } } - pub fn foreground(&self, default_colors: &Colors) -> Color4f { + pub fn foreground(&self, default_colors: &Colors) -> Color { self.style .as_ref() - .and_then(|s| s.colors.foreground) - .unwrap_or_else(|| default_colors.background.unwrap()) + .and_then(|s| s.colors.foreground.clone()) + .unwrap_or_else(|| default_colors.background.clone().unwrap()) } - pub fn background(&self, default_colors: &Colors) -> Color4f { + pub fn background(&self, default_colors: &Colors) -> Color { self.style .as_ref() - .and_then(|s| s.colors.background) - .unwrap_or_else(|| default_colors.foreground.unwrap()) + .and_then(|s| s.colors.background.clone()) + .unwrap_or_else(|| default_colors.foreground.clone().unwrap()) } pub fn alpha(&self) -> u8 { @@ -118,15 +118,15 @@ mod tests { use super::*; const COLORS: Colors = Colors { - foreground: Some(Color4f::new(0.1, 0.1, 0.1, 0.1)), - background: Some(Color4f::new(0.2, 0.1, 0.1, 0.1)), - special: Some(Color4f::new(0.3, 0.1, 0.1, 0.1)), + foreground: Some(Color::new(0.1, 0.1, 0.1, 0.1)), + background: Some(Color::new(0.2, 0.1, 0.1, 0.1)), + special: Some(Color::new(0.3, 0.1, 0.1, 0.1)), }; const DEFAULT_COLORS: Colors = Colors { - foreground: Some(Color4f::new(0.1, 0.2, 0.1, 0.1)), - background: Some(Color4f::new(0.2, 0.2, 0.1, 0.1)), - special: Some(Color4f::new(0.3, 0.2, 0.1, 0.1)), + foreground: Some(Color::new(0.1, 0.2, 0.1, 0.1)), + background: Some(Color::new(0.2, 0.2, 0.1, 0.1)), + special: Some(Color::new(0.3, 0.2, 0.1, 0.1)), }; const NONE_COLORS: Colors = Colors { diff --git a/src/editor/grid.rs b/src/editor/grid.rs index 0e3ff23b9..7e22d6e21 100644 --- a/src/editor/grid.rs +++ b/src/editor/grid.rs @@ -11,78 +11,152 @@ macro_rules! default_cell { }; } +#[derive(Clone)] +struct GridLine { + characters: Vec, +} + +impl GridLine { + pub fn new(length: usize) -> GridLine { + GridLine { + characters: vec![default_cell!(); length], + } + } +} + pub struct CharacterGrid { - pub width: u64, - pub height: u64, + pub width: usize, + pub height: usize, - characters: Vec, + lines: Vec, + top_index: isize, } impl CharacterGrid { - pub fn new(size: (u64, u64)) -> CharacterGrid { - let (width, height) = size; - let cell_count = (width * height) as usize; + pub fn new((width, height): (usize, usize)) -> CharacterGrid { CharacterGrid { - characters: vec![default_cell!(); cell_count], width, height, + top_index: 0, + lines: vec![GridLine::new(width); height], } } - pub fn resize(&mut self, (width, height): (u64, u64)) { - let new_cell_count = (width * height) as usize; - let mut new_characters = vec![default_cell!(); new_cell_count]; + pub fn resize(&mut self, (width, height): (usize, usize)) { + let mut new_lines = vec![GridLine::new(width); height]; for x in 0..self.width.min(width) { - for y in 0..self.height.min(height) { + for (y, new_line) in new_lines + .iter_mut() + .enumerate() + .take(self.height.min(height)) + { if let Some(existing_cell) = self.get_cell(x, y) { - new_characters[(x + y * width) as usize] = existing_cell.clone(); + new_line.characters[x] = existing_cell.clone(); } } } self.width = width; self.height = height; - self.characters = new_characters; + self.lines = new_lines; + self.top_index = 0; } pub fn clear(&mut self) { self.set_all_characters(default_cell!()); + self.top_index = 0; } - fn cell_index(&self, x: u64, y: u64) -> Option { - if x >= self.width || y >= self.height { - None - } else { - Some((x + y * self.width) as usize) - } - } - - pub fn get_cell(&self, x: u64, y: u64) -> Option<&GridCell> { - self.cell_index(x, y).map(|idx| &self.characters[idx]) + pub fn get_cell(&self, x: usize, y: usize) -> Option<&GridCell> { + let index = self.get_row_array_index(y as isize); + self.lines + .get(index) + .and_then(|line| line.characters.get(x)) } - pub fn get_cell_mut(&mut self, x: u64, y: u64) -> Option<&mut GridCell> { - self.cell_index(x, y) - .map(move |idx| &mut self.characters[idx]) + pub fn get_cell_mut(&mut self, x: usize, y: usize) -> Option<&mut GridCell> { + let index = self.get_row_array_index(y as isize); + self.lines + .get_mut(index) + .and_then(|line| line.characters.get_mut(x)) } pub fn set_all_characters(&mut self, value: GridCell) { - self.characters.clear(); - self.characters - .resize_with((self.width * self.height) as usize, || value.clone()); + for line in &mut self.lines { + for grid in &mut line.characters { + *grid = value.clone() + } + } } - pub fn row(&self, row_index: u64) -> Option<&[GridCell]> { + pub fn row(&self, row_index: usize) -> Option<&[GridCell]> { if row_index < self.height { - Some( - &self.characters - [(row_index * self.width) as usize..((row_index + 1) * self.width) as usize], - ) + Some(&self.lines[self.get_row_array_index(row_index as isize)].characters[..]) } else { None } } + + // Returns true if it's a pure up/down scroll + pub fn scroll_region( + &mut self, + top: usize, + bottom: usize, + left: usize, + right: usize, + rows: isize, + cols: isize, + ) -> bool { + if top == 0 && bottom == self.height && left == 0 && right == self.width && cols == 0 { + // Pure up/down scrolling is optimized, and furthermore does not destroy the region + // that has been scrolled out + self.top_index += rows; + true + } else { + let mut top_to_bottom; + let mut bottom_to_top; + let y_iter: &mut dyn Iterator = if rows > 0 { + top_to_bottom = (top as isize + rows) as usize..bottom; + &mut top_to_bottom + } else { + bottom_to_top = (top..(bottom as isize + rows) as usize).rev(); + &mut bottom_to_top + }; + + for y in y_iter { + let dest_y = y as isize - rows; + let mut cols_left; + let mut cols_right; + if dest_y >= 0 && dest_y < self.height as isize { + let x_iter: &mut dyn Iterator = if cols > 0 { + cols_left = (left as isize + cols) as usize..right; + &mut cols_left + } else { + cols_right = (left..(right as isize + cols) as usize).rev(); + &mut cols_right + }; + + for x in x_iter { + let dest_x = ((x as isize) - cols) as usize; + let cell_data = self.get_cell(x, y).cloned(); + + if let Some(cell_data) = cell_data { + if let Some(dest_cell) = self.get_cell_mut(dest_x, dest_y as usize) { + *dest_cell = cell_data; + } + } + } + } + } + false + } + } + + pub fn get_row_array_index(&self, index: isize) -> usize { + let rows = self.lines.len() as isize; + (self.top_index + index).rem_euclid(rows) as usize + } } #[cfg(test)] @@ -94,22 +168,20 @@ mod tests { #[derive(Debug)] struct Context { none_colors: Colors, - size: (u64, u64), - x: u64, - y: u64, - area: usize, - index: usize, + size: (usize, usize), + x: usize, + y: usize, } impl Context { fn new() -> Self { let size = ( - (thread_rng().gen::() % 500) + 1, - (thread_rng().gen::() % 500) + 1, + (thread_rng().gen::() % 500) + 1, + (thread_rng().gen::() % 500) + 1, ); let (x, y) = ( - thread_rng().gen::() % size.0, - thread_rng().gen::() % size.1, + thread_rng().gen::() % size.0, + thread_rng().gen::() % size.1, ); Self { none_colors: Colors { @@ -120,12 +192,47 @@ mod tests { size, x, y, - area: (size.0 * size.1) as usize, - index: (x + y * size.0) as usize, } } } + fn set_grid_line_to_chars(grid: &mut CharacterGrid, row: usize, value: &str) { + assert_eq!(value.len(), grid.width); + for (col_nr, chr) in value.chars().enumerate() { + *grid.get_cell_mut(col_nr, row).unwrap() = (chr.to_string(), None); + } + } + + fn assert_all_cells_equal_to(context: &Context, grid: &CharacterGrid, cell: &GridCell) { + for x in 0..context.size.0 { + for y in 0..context.size.1 { + assert_eq!(grid.get_cell(x, y), Some(cell)); + } + } + } + + fn assert_grid_cell_equal_to_char(grid: &CharacterGrid, x: usize, y: usize, chr: &str) { + let chr = chr.to_string(); + let value = (chr, None); + let cell = Some(&value); + assert_eq!(grid.get_cell(x, y), cell); + } + + fn create_initialized_grid(lines: &Vec<&str>) -> CharacterGrid { + let num_lines = lines.len(); + assert_ne!(num_lines, 0); + let line_lengths: Vec = lines.iter().map(|s| s.len()).collect(); + let num_columns = line_lengths[0]; + assert_eq!(line_lengths, vec![num_columns; num_lines]); + let mut grid = CharacterGrid::new((num_columns, num_lines)); + for (row_nr, line) in lines.iter().enumerate() { + for (col_nr, chr) in line.chars().enumerate() { + *grid.get_cell_mut(col_nr, row_nr).unwrap() = (chr.to_string(), None); + } + } + grid + } + #[test] fn new_constructs_grid() { let context = Context::new(); @@ -134,10 +241,7 @@ mod tests { let character_grid = CharacterGrid::new(context.size); assert_eq!(character_grid.width, context.size.0); assert_eq!(character_grid.height, context.size.1); - assert_eq!( - character_grid.characters, - vec![default_cell!(); context.area] - ); + assert_all_cells_equal_to(&context, &character_grid, &default_cell!()); } #[test] @@ -145,7 +249,7 @@ mod tests { let context = Context::new(); let mut character_grid = CharacterGrid::new(context.size); - character_grid.characters[context.index] = ( + character_grid.lines[context.y].characters[context.x] = ( "foo".to_string(), Some(Arc::new(Style::new(context.none_colors.clone()))), ); @@ -166,7 +270,7 @@ mod tests { let context = Context::new(); let mut character_grid = CharacterGrid::new(context.size); - character_grid.characters[context.index] = ( + character_grid.lines[context.y].characters[context.x] = ( "foo".to_string(), Some(Arc::new(Style::new(context.none_colors.clone()))), ); @@ -193,13 +297,13 @@ mod tests { let context = Context::new(); let grid_cell = ( "foo".to_string(), - Some(Arc::new(Style::new(context.none_colors))), + Some(Arc::new(Style::new(context.none_colors.clone()))), ); let mut character_grid = CharacterGrid::new(context.size); // RUN FUNCTION character_grid.set_all_characters(grid_cell.clone()); - assert_eq!(character_grid.characters, vec![grid_cell; context.area]); + assert_all_cells_equal_to(&context, &character_grid, &grid_cell); } #[test] @@ -209,19 +313,16 @@ mod tests { let grid_cell = ( "foo".to_string(), - Some(Arc::new(Style::new(context.none_colors))), + Some(Arc::new(Style::new(context.none_colors.clone()))), ); - character_grid.characters = vec![grid_cell; context.area]; + character_grid.set_all_characters(grid_cell.clone()); // RUN FUNCTION character_grid.clear(); assert_eq!(character_grid.width, context.size.0); assert_eq!(character_grid.height, context.size.1); - assert_eq!( - character_grid.characters, - vec![default_cell!(); context.area] - ); + assert_all_cells_equal_to(&context, &character_grid, &default_cell!()); } #[test] @@ -229,15 +330,15 @@ mod tests { let context = Context::new(); let mut character_grid = CharacterGrid::new(context.size); let (width, height) = ( - (thread_rng().gen::() % 500) + 1, - (thread_rng().gen::() % 500) + 1, + (thread_rng().gen::() % 500) + 1, + (thread_rng().gen::() % 500) + 1, ); let grid_cell = ( "foo".to_string(), Some(Arc::new(Style::new(context.none_colors))), ); - character_grid.characters = vec![grid_cell.clone(); context.area]; + character_grid.set_all_characters(grid_cell.clone()); // RUN FUNCTION character_grid.resize((width, height)); @@ -258,4 +359,138 @@ mod tests { } } } + + #[test] + fn scroll_down_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(0, 4, 0, 4, 2, 0); + assert_grid_cell_equal_to_char(&grid, 0, 0, "i"); + assert_grid_cell_equal_to_char(&grid, 3, 0, "l"); + assert_grid_cell_equal_to_char(&grid, 0, 1, "m"); + } + + #[test] + fn scroll_up_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(0, 4, 0, 4, -2, 0); + assert_grid_cell_equal_to_char(&grid, 0, 2, "a"); + assert_grid_cell_equal_to_char(&grid, 0, 3, "e"); + assert_grid_cell_equal_to_char(&grid, 3, 3, "h"); + } + + #[test] + fn partial_scroll_lines_down_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(1, 3, 0, 4, 1, 0); + // The initial line is not touched + assert_grid_cell_equal_to_char(&grid, 0, 0, "a"); + + assert_grid_cell_equal_to_char(&grid, 0, 1, "i"); + assert_grid_cell_equal_to_char(&grid, 3, 1, "l"); + + // The last line is not touched either + assert_grid_cell_equal_to_char(&grid, 0, 3, "m"); + } + + #[test] + fn partial_scroll_lines_up_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(1, 3, 0, 4, -1, 0); + // The initial line is not touched + assert_grid_cell_equal_to_char(&grid, 0, 0, "a"); + + assert_grid_cell_equal_to_char(&grid, 0, 2, "e"); + assert_grid_cell_equal_to_char(&grid, 3, 2, "h"); + + // The last line is not touched either + assert_grid_cell_equal_to_char(&grid, 0, 3, "m"); + } + + #[test] + fn scroll_left_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(0, 4, 0, 4, 0, 1); + assert_grid_cell_equal_to_char(&grid, 0, 0, "b"); + assert_grid_cell_equal_to_char(&grid, 2, 2, "l"); + } + + #[test] + fn scroll_right_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(0, 4, 0, 4, 0, -3); + assert_grid_cell_equal_to_char(&grid, 3, 0, "a"); + assert_grid_cell_equal_to_char(&grid, 3, 3, "m"); + } + + #[test] + fn scroll_inner_box_diagonally_moves_the_grid_correctly() { + let mut grid = create_initialized_grid(&["abcd", "efgh", "ijkl", "mnop"].to_vec()); + + grid.scroll_region(1, 3, 1, 3, 1, 1); + // The first row is preserved + assert_grid_cell_equal_to_char(&grid, 0, 0, "a"); + assert_grid_cell_equal_to_char(&grid, 1, 0, "b"); + + // The first character is not touched + assert_grid_cell_equal_to_char(&grid, 0, 1, "e"); + + // Only k is part of the box now + assert_grid_cell_equal_to_char(&grid, 1, 1, "k"); + + // The last character is not touched + assert_grid_cell_equal_to_char(&grid, 3, 1, "h"); + + // The last row is preserved + assert_grid_cell_equal_to_char(&grid, 0, 3, "m"); + } + + #[test] + fn scrolling_one_screen_down_works() { + let mut grid = create_initialized_grid(&["1", "2", "3", "4"].to_vec()); + // Scroll down one screen + grid.scroll_region(0, 4, 0, 1, 4, 0); + set_grid_line_to_chars(&mut grid, 0, "5"); + set_grid_line_to_chars(&mut grid, 1, "6"); + set_grid_line_to_chars(&mut grid, 2, "7"); + set_grid_line_to_chars(&mut grid, 3, "8"); + } + + #[test] + fn scrolling_more_than_one_screen_down_works_makes_a_small_jump() { + let mut grid = create_initialized_grid(&["1", "2", "3", "4"].to_vec()); + // Scroll down one screen + grid.scroll_region(0, 4, 0, 1, 4, 0); + set_grid_line_to_chars(&mut grid, 0, "5"); + set_grid_line_to_chars(&mut grid, 1, "6"); + set_grid_line_to_chars(&mut grid, 2, "7"); + set_grid_line_to_chars(&mut grid, 3, "8"); + } + + #[test] + fn scrolling_one_screen_up_works() { + let mut grid = create_initialized_grid(&["5", "6", "7", "8"].to_vec()); + // Scroll up one screen + grid.scroll_region(0, 4, 0, 1, -4, 0); + set_grid_line_to_chars(&mut grid, 0, "1"); + set_grid_line_to_chars(&mut grid, 1, "2"); + set_grid_line_to_chars(&mut grid, 2, "3"); + set_grid_line_to_chars(&mut grid, 3, "4"); + } + + #[test] + fn scrolling_more_than_one_screen_up_works_makes_a_small_jump() { + let mut grid = create_initialized_grid(&["5", "6", "7", "8"].to_vec()); + // Scroll up one screen + grid.scroll_region(0, 4, 0, 1, -4, 0); + set_grid_line_to_chars(&mut grid, 0, "1"); + set_grid_line_to_chars(&mut grid, 1, "2"); + set_grid_line_to_chars(&mut grid, 2, "3"); + set_grid_line_to_chars(&mut grid, 3, "4"); + } } diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 50f12660b..28618aa72 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -11,7 +11,7 @@ use log::{error, trace}; use crate::{ bridge::{GuiOption, RedrawEvent, WindowAnchor}, event_aggregator::EVENT_AGGREGATOR, - redraw_scheduler::REDRAW_SCHEDULER, + profiling::tracy_zone, renderer::DrawCommand, window::WindowCommand, }; @@ -81,9 +81,11 @@ impl Editor { match command { EditorCommand::NeovimRedrawEvent(event) => match event { RedrawEvent::SetTitle { title } => { + tracy_zone!("EditorSetTitle"); EVENT_AGGREGATOR.send(WindowCommand::TitleChanged(title)); } RedrawEvent::ModeInfoSet { cursor_modes } => { + tracy_zone!("EditorModeInfoSet"); self.mode_list = cursor_modes; if let Some(current_mode_i) = self.current_mode_index { if let Some(current_mode) = self.mode_list.get(current_mode_i as usize) { @@ -91,8 +93,12 @@ impl Editor { } } } - RedrawEvent::OptionSet { gui_option } => self.set_option(gui_option), + RedrawEvent::OptionSet { gui_option } => { + tracy_zone!("EditorOptionSet"); + self.set_option(gui_option); + } RedrawEvent::ModeChange { mode, mode_index } => { + tracy_zone!("ModeChange"); if let Some(cursor_mode) = self.mode_list.get(mode_index as usize) { self.cursor.change_mode(cursor_mode, &self.defined_styles); self.current_mode_index = Some(mode_index) @@ -104,46 +110,58 @@ impl Editor { .ok(); } RedrawEvent::MouseOn => { + tracy_zone!("EditorMouseOn"); EVENT_AGGREGATOR.send(WindowCommand::SetMouseEnabled(true)); } RedrawEvent::MouseOff => { + tracy_zone!("EditorMouseOff"); EVENT_AGGREGATOR.send(WindowCommand::SetMouseEnabled(false)); } RedrawEvent::BusyStart => { + tracy_zone!("EditorBusyStart"); trace!("Cursor off"); self.cursor.enabled = false; } RedrawEvent::BusyStop => { + tracy_zone!("EditorBusyStop"); trace!("Cursor on"); self.cursor.enabled = true; } RedrawEvent::Flush => { + tracy_zone!("EditorFlush"); trace!("Image flushed"); self.send_cursor_info(); - self.draw_command_batcher.send_batch(); - REDRAW_SCHEDULER.queue_next_frame(); + { + trace!("send_batch"); + self.draw_command_batcher.send_batch(); + } } RedrawEvent::DefaultColorsSet { colors } => { + tracy_zone!("EditorDefaultColorsSet"); self.draw_command_batcher .queue(DrawCommand::DefaultStyleChanged(Style::new(colors))) .ok(); self.redraw_screen(); self.draw_command_batcher.send_batch(); - REDRAW_SCHEDULER.queue_next_frame(); } RedrawEvent::HighlightAttributesDefine { id, style } => { + tracy_zone!("EditorHighlightAttributesDefine"); self.defined_styles.insert(id, Arc::new(style)); } RedrawEvent::CursorGoto { grid, column: left, row: top, - } => self.set_cursor_position(grid, left, top), + } => { + tracy_zone!("EditorCursorGoto"); + self.set_cursor_position(grid, left, top); + } RedrawEvent::Resize { grid, width, height, } => { + tracy_zone!("EditorResize"); self.resize_window(grid, width, height); } RedrawEvent::GridLine { @@ -152,6 +170,7 @@ impl Editor { column_start, cells, } => { + tracy_zone!("EditorGridLine"); let defined_styles = &self.defined_styles; let window = self.windows.get_mut(&grid); if let Some(window) = window { @@ -159,12 +178,16 @@ impl Editor { } } RedrawEvent::Clear { grid } => { + tracy_zone!("EditorClear"); let window = self.windows.get_mut(&grid); if let Some(window) = window { window.clear(); } } - RedrawEvent::Destroy { grid } => self.close_window(grid), + RedrawEvent::Destroy { grid } => { + tracy_zone!("EditorDestroy"); + self.close_window(grid) + } RedrawEvent::Scroll { grid, top, @@ -174,6 +197,7 @@ impl Editor { rows, columns, } => { + tracy_zone!("EditorScroll"); let window = self.windows.get_mut(&grid); if let Some(window) = window { window.scroll_region(top, bottom, left, right, rows, columns); @@ -185,7 +209,10 @@ impl Editor { start_column, width, height, - } => self.set_window_position(grid, start_column, start_row, width, height), + } => { + tracy_zone!("EditorWindowPosition"); + self.set_window_position(grid, start_column, start_row, width, height) + } RedrawEvent::WindowFloatPosition { grid, anchor, @@ -194,22 +221,30 @@ impl Editor { anchor_row: anchor_top, sort_order, .. - } => self.set_window_float_position( - grid, - anchor_grid, - anchor, - anchor_left, - anchor_top, - sort_order, - ), + } => { + tracy_zone!("EditorWindowFloatPosition"); + self.set_window_float_position( + grid, + anchor_grid, + anchor, + anchor_left, + anchor_top, + sort_order, + ) + } RedrawEvent::WindowHide { grid } => { + tracy_zone!("EditorWindowHide"); let window = self.windows.get(&grid); if let Some(window) = window { window.hide(); } } - RedrawEvent::WindowClose { grid } => self.close_window(grid), + RedrawEvent::WindowClose { grid } => { + tracy_zone!("EditorWindowClose"); + self.close_window(grid) + } RedrawEvent::MessageSetPosition { grid, row, .. } => { + tracy_zone!("EditorMessageSetPosition"); self.set_message_position(grid, row) } RedrawEvent::WindowViewport { @@ -217,10 +252,16 @@ impl Editor { top_line, bottom_line, .. - } => self.send_updated_viewport(grid, top_line, bottom_line), + } => { + tracy_zone!("EditorWindowViewport"); + self.send_updated_viewport(grid, top_line, bottom_line); + } _ => {} }, - EditorCommand::RedrawScreen => self.redraw_screen(), + EditorCommand::RedrawScreen => { + tracy_zone!("EditorRedrawScreen"); + self.redraw_screen(); + } }; } @@ -423,6 +464,7 @@ impl Editor { } fn send_cursor_info(&mut self) { + tracy_zone!("send_cursor_info"); let (grid_left, grid_top) = self.cursor.grid_position; if let Some(window) = self.windows.get(&self.cursor.parent_window_id) { let (character, style, double_width) = window.get_cursor_grid_cell(grid_left, grid_top); diff --git a/src/editor/style.rs b/src/editor/style.rs index f712cdfdb..56f2fd722 100644 --- a/src/editor/style.rs +++ b/src/editor/style.rs @@ -1,10 +1,10 @@ -use skia_safe::Color4f; +use csscolorparser::Color; #[derive(new, Debug, Clone, PartialEq)] pub struct Colors { - pub foreground: Option, - pub background: Option, - pub special: Option, + pub foreground: Option, + pub background: Option, + pub special: Option, } #[derive(Debug, Clone, Copy, Eq, PartialEq)] @@ -34,33 +34,38 @@ pub struct Style { } impl Style { - pub fn foreground(&self, default_colors: &Colors) -> Color4f { + pub fn foreground(&self, default_colors: &Colors) -> Color { if self.reverse { self.colors .background - .unwrap_or_else(|| default_colors.background.unwrap()) + .clone() + .unwrap_or_else(|| default_colors.background.clone().unwrap()) } else { self.colors .foreground - .unwrap_or_else(|| default_colors.foreground.unwrap()) + .clone() + .unwrap_or_else(|| default_colors.foreground.clone().unwrap()) } } - pub fn background(&self, default_colors: &Colors) -> Color4f { + pub fn background(&self, default_colors: &Colors) -> Color { if self.reverse { self.colors .foreground - .unwrap_or_else(|| default_colors.foreground.unwrap()) + .clone() + .unwrap_or_else(|| default_colors.foreground.clone().unwrap()) } else { self.colors .background - .unwrap_or_else(|| default_colors.background.unwrap()) + .clone() + .unwrap_or_else(|| default_colors.background.clone().unwrap()) } } - pub fn special(&self, default_colors: &Colors) -> Color4f { + pub fn special(&self, default_colors: &Colors) -> Color { self.colors .special + .clone() .unwrap_or_else(|| self.foreground(default_colors)) } } diff --git a/src/editor/window.rs b/src/editor/window.rs index 250c43d9e..900038a95 100644 --- a/src/editor/window.rs +++ b/src/editor/window.rs @@ -36,7 +36,7 @@ impl Window { ) -> Window { let window = Window { grid_id, - grid: CharacterGrid::new(grid_size), + grid: CharacterGrid::new((grid_size.0 as usize, grid_size.1 as usize)), window_type, anchor_info, grid_position, @@ -58,7 +58,7 @@ impl Window { fn send_updated_position(&self) { self.send_command(WindowDrawCommand::Position { grid_position: self.grid_position, - grid_size: (self.grid.width, self.grid.height), + grid_size: (self.grid.width as u64, self.grid.height as u64), floating_order: self.anchor_info.clone().map(|anchor| anchor.sort_order), }); } @@ -68,12 +68,18 @@ impl Window { window_left: u64, window_top: u64, ) -> (String, Option>, bool) { - let grid_cell = match self.grid.get_cell(window_left, window_top) { + let grid_cell = match self + .grid + .get_cell(window_left as usize, window_top as usize) + { Some((character, style)) => (character.clone(), style.clone()), _ => (' '.to_string(), None), }; - let double_width = match self.grid.get_cell(window_left + 1, window_top) { + let double_width = match self + .grid + .get_cell(window_left as usize + 1, window_top as usize) + { Some((character, _)) => character.is_empty(), _ => false, }; @@ -82,11 +88,11 @@ impl Window { } pub fn get_width(&self) -> u64 { - self.grid.width + self.grid.width as u64 } pub fn get_height(&self) -> u64 { - self.grid.height + self.grid.height as u64 } pub fn get_grid_position(&self) -> (f64, f64) { @@ -99,7 +105,10 @@ impl Window { grid_size: (u64, u64), grid_position: (f64, f64), ) { - self.grid.resize(grid_size); + // This could perhaps be optimized, setting the position does not necessarily need + // to rezize, and reset everything + self.grid + .resize((grid_size.0 as usize, grid_size.1 as usize)); self.anchor_info = anchor_info; self.grid_position = grid_position; self.send_updated_position(); @@ -107,15 +116,15 @@ impl Window { } pub fn resize(&mut self, new_size: (u64, u64)) { - self.grid.resize(new_size); + self.grid.resize((new_size.0 as usize, new_size.1 as usize)); self.send_updated_position(); self.redraw(); } fn modify_grid( &mut self, - row_index: u64, - column_pos: &mut u64, + row_index: usize, + column_pos: &mut usize, cell: GridLineCell, defined_styles: &HashMap>, previous_style: &mut Option>, @@ -153,16 +162,15 @@ impl Window { // Build a line fragment for the given row starting from current_start up until the next style // change or double width character. - fn build_line_fragment(&self, row_index: u64, start: u64) -> (u64, LineFragment) { + fn build_line_fragment(&self, row_index: usize, start: usize) -> (usize, LineFragment) { let row = self.grid.row(row_index).unwrap(); - let (_, style) = &row[start as usize]; + let (_, style) = &row[start]; let mut text = String::new(); let mut width = 0; - for possible_end_index in start..self.grid.width { - let (character, possible_end_style) = &row[possible_end_index as usize]; + for (character, possible_end_style) in row.iter().take(self.grid.width).skip(start) { // Style doesn't match. Draw what we've got. if style != possible_end_style { break; @@ -180,9 +188,8 @@ impl Window { let line_fragment = LineFragment { text, - window_left: start, - window_top: row_index, - width, + window_left: start as u64, + width: width as u64, style: style.clone(), }; @@ -192,7 +199,7 @@ impl Window { // Redraw line by calling build_line_fragment starting at 0 // until current_start is greater than the grid width and sending the resulting // fragments as a batch. - fn redraw_line(&self, row: u64) { + fn redraw_line(&self, row: usize) { let mut current_start = 0; let mut line_fragments = Vec::new(); while current_start < self.grid.width { @@ -200,7 +207,10 @@ impl Window { current_start = next_start; line_fragments.push(line_fragment); } - self.send_command(WindowDrawCommand::DrawLine(line_fragments)); + self.send_command(WindowDrawCommand::DrawLine { + row, + line_fragments, + }); } pub fn draw_grid_line( @@ -211,8 +221,9 @@ impl Window { defined_styles: &HashMap>, ) { let mut previous_style = None; + let row = row as usize; if row < self.grid.height { - let mut column_pos = column_start; + let mut column_pos = column_start as usize; for cell in cells { self.modify_grid( row, @@ -248,16 +259,17 @@ impl Window { rows: i64, cols: i64, ) { - let mut top_to_bottom; - let mut bottom_to_top; - let y_iter: &mut dyn Iterator = if rows > 0 { - top_to_bottom = (top as i64 + rows)..bottom as i64; - &mut top_to_bottom - } else { - bottom_to_top = (top as i64..(bottom as i64 + rows)).rev(); - &mut bottom_to_top - }; + let is_pure_updown = self.grid.scroll_region( + top as usize, + bottom as usize, + left as usize, + right as usize, + rows as isize, + cols as isize, + ); + // Scrolls must not only translate the rendered texture, but also must move the grid data + // accordingly so that future renders work correctly. self.send_command(WindowDrawCommand::Scroll { top, bottom, @@ -267,33 +279,21 @@ impl Window { cols, }); - // Scrolls must not only translate the rendered texture, but also must move the grid data - // accordingly so that future renders work correctly. - for y in y_iter { - let dest_y = y - rows; - let mut cols_left; - let mut cols_right; - if dest_y >= 0 && dest_y < self.grid.height as i64 { - let x_iter: &mut dyn Iterator = if cols > 0 { - cols_left = (left as i64 + cols)..right as i64; - &mut cols_left - } else { - cols_right = (left as i64..(right as i64 + cols)).rev(); - &mut cols_right - }; - - for x in x_iter { - let dest_x = x - cols; - let cell_data = self.grid.get_cell(x as u64, y as u64).cloned(); - - if let Some(cell_data) = cell_data { - if let Some(dest_cell) = - self.grid.get_cell_mut(dest_x as u64, dest_y as u64) - { - *dest_cell = cell_data; - } - } - } + // There's no need to send any updates for pure up/down scrolling, the actual new lines + // will be sent later + if !is_pure_updown { + let mut top = top as isize; + let mut bottom = bottom as isize; + // Send only the scrolled lines + // neovim will send the rest later + if rows > 0 { + bottom -= rows as isize; + } else { + top -= rows as isize; + } + + for row in top..bottom { + self.redraw_line(row as usize); } } } diff --git a/src/main.rs b/src/main.rs index 93e349295..6fd03f442 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,7 @@ mod editor; mod error_handling; mod event_aggregator; mod frame; -mod redraw_scheduler; +mod profiling; mod renderer; mod running_tracker; mod settings; @@ -57,6 +57,8 @@ pub use running_tracker::*; #[cfg(target_os = "windows")] pub use windows_utils::*; +pub use profiling::startup_profiler; + const BACKTRACES_FILE: &str = "neovide_backtraces.log"; const REQUEST_MESSAGE: &str = "This is a bug and we would love for it to be reported to https://github.com/neovide/neovide/issues"; @@ -139,6 +141,8 @@ fn protected_main() { // Multiple other parts of the app "queue_next_frame" function to ensure animations continue // properly or updates to the graphics are pushed to the screen. + startup_profiler(); + #[cfg(target_os = "windows")] windows_attach_to_console(); diff --git a/src/profiling/mod.rs b/src/profiling/mod.rs new file mode 100644 index 000000000..3dd376d76 --- /dev/null +++ b/src/profiling/mod.rs @@ -0,0 +1,9 @@ +#[cfg(not(feature = "profiling"))] +mod profiling_disabled; +#[cfg(feature = "profiling")] +mod profiling_enabled; + +#[cfg(not(feature = "profiling"))] +pub use profiling_disabled::*; +#[cfg(feature = "profiling")] +pub use profiling_enabled::*; diff --git a/src/profiling/profiling_disabled.rs b/src/profiling/profiling_disabled.rs new file mode 100644 index 000000000..6d59e72c8 --- /dev/null +++ b/src/profiling/profiling_disabled.rs @@ -0,0 +1,23 @@ +#[inline(always)] +pub fn startup_profiler() {} + +#[inline(always)] +pub fn emit_frame_mark() {} + +#[inline(always)] +pub fn tracy_create_gpu_context(_name: &str) {} + +#[inline(always)] +pub fn tracy_gpu_collect() {} + +macro_rules! tracy_zone { + ($name: expr, $color: expr) => {}; + ($name: expr) => {}; +} +macro_rules! tracy_gpu_zone { + ($name: expr, $color: expr) => {}; + ($name: expr) => {}; +} + +pub(crate) use tracy_gpu_zone; +pub(crate) use tracy_zone; diff --git a/src/profiling/profiling_enabled.rs b/src/profiling/profiling_enabled.rs new file mode 100644 index 000000000..467702798 --- /dev/null +++ b/src/profiling/profiling_enabled.rs @@ -0,0 +1,309 @@ +use std::{ + cell::RefCell, + ffi::CString, + mem, + ptr::null, + sync::atomic::{AtomicU8, Ordering}, +}; + +use tracy_client_sys::{ + ___tracy_c_zone_context, ___tracy_connected, ___tracy_emit_frame_mark, + ___tracy_emit_gpu_context_name, ___tracy_emit_gpu_new_context, ___tracy_emit_gpu_time_serial, + ___tracy_emit_gpu_zone_begin_serial, ___tracy_emit_gpu_zone_end_serial, + ___tracy_emit_zone_begin, ___tracy_emit_zone_end, ___tracy_gpu_context_name_data, + ___tracy_gpu_new_context_data, ___tracy_gpu_time_data, ___tracy_gpu_zone_begin_data, + ___tracy_gpu_zone_end_data, ___tracy_source_location_data, ___tracy_startup_profiler, +}; + +use gl::{ + GenQueries, GetInteger64v, GetQueryObjectiv, GetQueryObjectui64v, QueryCounter, QUERY_RESULT, + QUERY_RESULT_AVAILABLE, TIMESTAMP, +}; + +pub struct _LocationData { + pub data: ___tracy_source_location_data, +} + +unsafe impl Send for _LocationData {} +unsafe impl Sync for _LocationData {} + +#[allow(unconditional_panic)] +const fn illegal_null_in_string() { + [][0] +} + +#[doc(hidden)] +pub const fn validate_cstr_contents(bytes: &[u8]) { + let mut i = 0; + while i < bytes.len() { + if bytes[i] == b'\0' { + illegal_null_in_string(); + } + i += 1; + } +} + +macro_rules! cstr { + ( $s:literal ) => {{ + $crate::profiling::validate_cstr_contents($s.as_bytes()); + unsafe { std::mem::transmute::<_, &std::ffi::CStr>(concat!($s, "\0")) } + }}; +} + +macro_rules! file_cstr { + ( ) => {{ + unsafe { std::mem::transmute::<_, &std::ffi::CStr>(concat!(std::file!(), "\0")) } + }}; +} + +pub const fn _create_location_data( + name: &std::ffi::CStr, + function: &std::ffi::CStr, + file: &std::ffi::CStr, + line: u32, + color: u32, +) -> _LocationData { + _LocationData { + data: ___tracy_source_location_data { + name: name.as_ptr(), + function: function.as_ptr(), + file: file.as_ptr(), + line, + color, + }, + } +} + +#[allow(dead_code)] +fn is_connected() -> bool { + unsafe { ___tracy_connected() > 0 } +} + +#[cfg(feature = "gpu_profiling")] +fn gpu_enabled() -> bool { + is_connected() +} + +#[cfg(not(feature = "gpu_profiling"))] +fn gpu_enabled() -> bool { + false +} + +pub struct _Zone { + context: ___tracy_c_zone_context, + gpu: bool, +} + +impl _Zone { + pub fn new(loc_data: &___tracy_source_location_data, gpu: bool) -> Self { + let context = unsafe { ___tracy_emit_zone_begin(loc_data, 1) }; + let gpu = gpu && gpu_enabled(); + if gpu { + let (context, query, glquery) = GPUCTX.with(|ctx| { + let mut ctx = ctx.borrow_mut(); + let query = ctx.next_query_id(); + (ctx.id, query, ctx.query[query]) + }); + + let gpu_data = ___tracy_gpu_zone_begin_data { + srcloc: (loc_data as *const ___tracy_source_location_data) as u64, + queryId: query as u16, + context, + }; + unsafe { + QueryCounter(glquery, TIMESTAMP); + ___tracy_emit_gpu_zone_begin_serial(gpu_data); + } + } + _Zone { context, gpu } + } +} + +impl Drop for _Zone { + fn drop(&mut self) { + if self.gpu && gpu_enabled() { + let (context, query, glquery) = GPUCTX.with(|ctx| { + let mut ctx = ctx.borrow_mut(); + let query = ctx.next_query_id(); + (ctx.id, query, ctx.query[query]) + }); + let gpu_data = ___tracy_gpu_zone_end_data { + queryId: query as u16, + context, + }; + unsafe { + QueryCounter(glquery, TIMESTAMP); + ___tracy_emit_gpu_zone_end_serial(gpu_data); + } + } + unsafe { + ___tracy_emit_zone_end(self.context); + } + } +} + +static CONTEXT_ID: AtomicU8 = AtomicU8::new(0); + +struct GpuCtx { + id: u8, + query: [u32; 64 * 1024], + head: usize, + tail: usize, +} + +impl GpuCtx { + fn next_query_id(&mut self) -> usize { + let query = self.head; + self.head = (self.head + 1) % self.query.len(); + assert!(self.head != self.tail); + query + } +} + +thread_local! { + static GPUCTX: RefCell = RefCell::new(GpuCtx { + id: CONTEXT_ID.fetch_add(1, Ordering::Relaxed), + query: unsafe {mem::MaybeUninit::zeroed().assume_init()}, + head: 0, + tail: 0, + }); +} + +pub fn startup_profiler() { + unsafe { + ___tracy_startup_profiler(); + } +} + +#[inline(always)] +pub fn emit_frame_mark() { + unsafe { + ___tracy_emit_frame_mark(null()); + } +} + +pub fn tracy_create_gpu_context(name: &str) { + // Don't change order, only add new entries at the end, this is also used on trace dumps! + #[allow(dead_code)] + enum GpuContextType { + Invalid, + OpenGl, + Vulkan, + OpenCL, + Direct3D12, + Direct3D11, + } + + let id = GPUCTX.with(|ctx| { + let mut ctx = ctx.borrow_mut(); + unsafe { + GenQueries(ctx.query.len() as i32, ctx.query.as_mut_ptr()); + } + + ctx.id + }); + + let mut timestamp: i64 = 0; + unsafe { + GetInteger64v(TIMESTAMP, &mut timestamp); + } + + let ctxt_data = ___tracy_gpu_new_context_data { + gpuTime: timestamp, + period: 1.0, + context: id, + flags: 0, + type_: GpuContextType::OpenGl as u8, + }; + let namestring = CString::new(name).unwrap(); + let name_data = ___tracy_gpu_context_name_data { + context: id, + name: namestring.as_ptr(), + len: name.len() as u16, + }; + unsafe { + ___tracy_emit_gpu_new_context(ctxt_data); + ___tracy_emit_gpu_context_name(name_data); + } +} + +pub fn tracy_gpu_collect() { + tracy_zone!("collect gpu info"); + if !gpu_enabled() { + return; + } + + GPUCTX.with(|ctx| { + let mut ctx = ctx.borrow_mut(); + + while ctx.tail != ctx.head { + let mut available: i32 = 0; + unsafe { + GetQueryObjectiv(ctx.query[ctx.tail], QUERY_RESULT_AVAILABLE, &mut available); + } + if available <= 0 { + break; + } + + let mut time: u64 = 0; + unsafe { + GetQueryObjectui64v(ctx.query[ctx.tail], QUERY_RESULT, &mut time); + } + let time_data = ___tracy_gpu_time_data { + gpuTime: time as i64, + queryId: ctx.tail as u16, + context: ctx.id, + }; + unsafe { + ___tracy_emit_gpu_time_serial(time_data); + } + ctx.tail = (ctx.tail + 1) % ctx.query.len(); + } + }); +} + +#[macro_export] +macro_rules! location_data { + ($name: expr, $color: expr) => {{ + static LOC: $crate::profiling::_LocationData = $crate::profiling::_create_location_data( + $crate::profiling::cstr!($name), + // There does not seem to be any way of getting a c string to the current + // function until this is implemented + // https://github.com/rust-lang/rust/issues/63084 + // So use Unknown for now + $crate::profiling::cstr!("Unknown"), + $crate::profiling::file_cstr!(), + std::line!(), + $color, + ); + &LOC.data + }}; +} + +#[macro_export] +macro_rules! tracy_zone { + ($name: expr, $color: expr) => { + let _tracy_zone = + $crate::profiling::_Zone::new($crate::profiling::location_data!($name, $color), false); + }; + ($name: expr) => { + $crate::profiling::tracy_zone!($name, 0) + }; +} + +#[macro_export] +macro_rules! tracy_gpu_zone { + ($name: expr, $color: expr) => { + let _tracy_zone = + $crate::profiling::_Zone::new($crate::profiling::location_data!($name, $color), true); + }; + ($name: expr) => { + $crate::profiling::tracy_gpu_zone!($name, 0) + }; +} + +pub(crate) use cstr; +pub(crate) use file_cstr; +pub(crate) use location_data; +pub(crate) use tracy_gpu_zone; +pub(crate) use tracy_zone; diff --git a/src/redraw_scheduler.rs b/src/redraw_scheduler.rs deleted file mode 100644 index 11393bf43..000000000 --- a/src/redraw_scheduler.rs +++ /dev/null @@ -1,65 +0,0 @@ -use std::{ - sync::{ - atomic::{AtomicBool, Ordering}, - Mutex, - }, - time::Instant, -}; - -use log::trace; - -lazy_static! { - pub static ref REDRAW_SCHEDULER: RedrawScheduler = RedrawScheduler::new(); -} - -pub struct RedrawScheduler { - scheduled_frame: Mutex>, - frame_queued: AtomicBool, -} - -impl RedrawScheduler { - pub fn new() -> RedrawScheduler { - RedrawScheduler { - scheduled_frame: Mutex::new(None), - frame_queued: AtomicBool::new(true), - } - } - - pub fn schedule(&self, new_scheduled: Instant) { - trace!("Redraw scheduled for {:?}", new_scheduled); - let mut scheduled_frame = self.scheduled_frame.lock().unwrap(); - - if let Some(previous_scheduled) = *scheduled_frame { - if new_scheduled < previous_scheduled { - *scheduled_frame = Some(new_scheduled); - } - } else { - *scheduled_frame = Some(new_scheduled); - } - } - - pub fn queue_next_frame(&self) { - trace!("Next frame queued"); - self.frame_queued.store(true, Ordering::Relaxed); - } - - pub fn should_draw(&self) -> bool { - if self.frame_queued.load(Ordering::Relaxed) { - self.frame_queued.store(false, Ordering::Relaxed); - true - } else { - let mut next_scheduled_frame = self.scheduled_frame.lock().unwrap(); - - if let Some(scheduled_frame) = *next_scheduled_frame { - if scheduled_frame < Instant::now() { - *next_scheduled_frame = None; - true - } else { - false - } - } else { - false - } - } - } -} diff --git a/src/renderer/animation_utils.rs b/src/renderer/animation_utils.rs index e884490e3..b44758c28 100644 --- a/src/renderer/animation_utils.rs +++ b/src/renderer/animation_utils.rs @@ -1,4 +1,4 @@ -use skia_safe::Point; +use euclid::default::Point2D; #[allow(dead_code)] pub fn ease_linear(t: f32) -> f32 { @@ -73,11 +73,16 @@ pub fn ease(ease_func: fn(f32) -> f32, start: f32, end: f32, t: f32) -> f32 { lerp(start, end, ease_func(t)) } -pub fn ease_point(ease_func: fn(f32) -> f32, start: Point, end: Point, t: f32) -> Point { - Point { - x: ease(ease_func, start.x, end.x, t), - y: ease(ease_func, start.y, end.y, t), - } +pub fn ease_point( + ease_func: fn(f32) -> f32, + start: Point2D, + end: Point2D, + t: f32, +) -> Point2D { + Point2D::new( + ease(ease_func, start.x, end.x, t), + ease(ease_func, start.y, end.y, t), + ) } #[cfg(test)] diff --git a/src/renderer/cursor_renderer/blink.rs b/src/renderer/cursor_renderer/blink.rs index 9529d3569..0c4212608 100644 --- a/src/renderer/cursor_renderer/blink.rs +++ b/src/renderer/cursor_renderer/blink.rs @@ -1,6 +1,4 @@ -use std::time::{Duration, Instant}; - -use crate::{editor::Cursor, redraw_scheduler::REDRAW_SCHEDULER}; +use crate::editor::Cursor; #[derive(Debug)] pub enum BlinkState { @@ -11,68 +9,74 @@ pub enum BlinkState { pub struct BlinkStatus { state: BlinkState, - last_transition: Instant, - previous_cursor: Option, + transition_left: f32, + current_cursor: Option, +} + +fn is_static(cursor: &Cursor) -> bool { + // The documentations says that if any state is zero there's no blinking + cursor.blinkwait == Some(0) + || cursor.blinkwait.is_none() + || cursor.blinkoff == Some(0) + || cursor.blinkoff.is_none() + || cursor.blinkon == Some(0) + || cursor.blinkon.is_none() } impl BlinkStatus { pub fn new() -> BlinkStatus { BlinkStatus { state: BlinkState::Waiting, - last_transition: Instant::now(), - previous_cursor: None, + transition_left: 0.0, + current_cursor: None, } } - pub fn update_status(&mut self, new_cursor: &Cursor) -> bool { - if self.previous_cursor.is_none() || new_cursor != self.previous_cursor.as_ref().unwrap() { - self.previous_cursor = Some(new_cursor.clone()); - self.last_transition = Instant::now(); + fn get_delay(&self) -> f32 { + let delay_ms = if let Some(c) = &self.current_cursor { + match self.state { + BlinkState::Waiting => c.blinkwait.unwrap_or(0), + BlinkState::Off => c.blinkoff.unwrap_or(0), + BlinkState::On => c.blinkon.unwrap_or(0), + } + } else { + 0 + }; + (delay_ms as f32) / 1000.0 + } + + pub fn update_status(&mut self, new_cursor: &Cursor, dt: f32) { + if self.current_cursor.is_none() || new_cursor != self.current_cursor.as_ref().unwrap() { + self.current_cursor = Some(new_cursor.clone()); if new_cursor.blinkwait.is_some() && new_cursor.blinkwait != Some(0) { self.state = BlinkState::Waiting; } else { self.state = BlinkState::On; } + // Note we decrement by dt below, so add dt here to ensure that we wait long enough + self.transition_left = self.get_delay() + dt; } - if new_cursor.blinkwait == Some(0) - || new_cursor.blinkoff == Some(0) - || new_cursor.blinkon == Some(0) - { - return true; - } + let current_cursor = self.current_cursor.as_ref().unwrap(); - let delay = match self.state { - BlinkState::Waiting => new_cursor.blinkwait, - BlinkState::Off => new_cursor.blinkoff, - BlinkState::On => new_cursor.blinkon, - } - .filter(|millis| *millis > 0) - .map(Duration::from_millis); - - if delay - .map(|delay| self.last_transition + delay < Instant::now()) - .unwrap_or(false) - { - self.state = match self.state { - BlinkState::Waiting => BlinkState::On, - BlinkState::On => BlinkState::Off, - BlinkState::Off => BlinkState::On, - }; - self.last_transition = Instant::now(); - } + if is_static(current_cursor) { + self.state = BlinkState::On; + self.transition_left = 0.0; + } else { + self.transition_left -= dt; - let scheduled_frame = (match self.state { - BlinkState::Waiting => new_cursor.blinkwait, - BlinkState::Off => new_cursor.blinkoff, - BlinkState::On => new_cursor.blinkon, - }) - .map(|delay| self.last_transition + Duration::from_millis(delay)); - - if let Some(scheduled_frame) = scheduled_frame { - REDRAW_SCHEDULER.schedule(scheduled_frame); + if self.transition_left <= 0.0 { + self.state = match self.state { + BlinkState::Waiting => BlinkState::On, + BlinkState::On => BlinkState::Off, + BlinkState::Off => BlinkState::On, + }; + self.transition_left = self.get_delay(); + } } + } + pub fn should_render(&self) -> bool { match self.state { BlinkState::Off => false, BlinkState::On | BlinkState::Waiting => true, diff --git a/src/renderer/cursor_renderer/mod.rs b/src/renderer/cursor_renderer/mod.rs index c471f2817..6e18e13c3 100644 --- a/src/renderer/cursor_renderer/mod.rs +++ b/src/renderer/cursor_renderer/mod.rs @@ -1,18 +1,23 @@ mod blink; -mod cursor_vfx; +//mod cursor_vfx; use std::collections::HashMap; -use glutin::event::{Event, WindowEvent}; -use skia_safe::{op, Canvas, Paint, Path, Point}; +//use skia_safe::{op, Canvas, Paint, Path, Point}; +use euclid::{ + approxeq::ApproxEq, + default::{Point2D, Vector2D}, +}; +use winit::event::{Event, WindowEvent}; use crate::{ bridge::EditorMode, editor::{Cursor, CursorShape}, - redraw_scheduler::REDRAW_SCHEDULER, + profiling::tracy_zone, renderer::animation_utils::*, renderer::{GridRenderer, RenderedWindow}, settings::{ParseFromValue, SETTINGS}, + window::UserEvent, }; use blink::*; @@ -33,7 +38,7 @@ pub struct CursorSettings { trail_size: f32, unfocused_outline_width: f32, - vfx_mode: cursor_vfx::VfxMode, + //vfx_mode: cursor_vfx::VfxMode, vfx_opacity: f32, vfx_particle_lifetime: f32, vfx_particle_density: f32, @@ -52,7 +57,7 @@ impl Default for CursorSettings { animate_command_line: true, trail_size: 0.7, unfocused_outline_width: 1.0 / 8.0, - vfx_mode: cursor_vfx::VfxMode::Disabled, + //vfx_mode: cursor_vfx::VfxMode::Disabled, vfx_opacity: 200.0, vfx_particle_lifetime: 1.2, vfx_particle_density: 7.0, @@ -65,10 +70,10 @@ impl Default for CursorSettings { #[derive(Debug, Clone)] pub struct Corner { - start_position: Point, - current_position: Point, - relative_position: Point, - previous_destination: Point, + start_position: Point2D, + current_position: Point2D, + relative_position: Point2D, + previous_destination: Point2D, length_multiplier: f32, t: f32, } @@ -76,10 +81,10 @@ pub struct Corner { impl Corner { pub fn new() -> Corner { Corner { - start_position: Point::new(0.0, 0.0), - current_position: Point::new(0.0, 0.0), - relative_position: Point::new(0.0, 0.0), - previous_destination: Point::new(-1000.0, -1000.0), + start_position: Point2D::new(0.0, 0.0), + current_position: Point2D::new(0.0, 0.0), + relative_position: Point2D::new(0.0, 0.0), + previous_destination: Point2D::new(-1000.0, -1000.0), length_multiplier: 1.0, t: 0.0, } @@ -88,8 +93,8 @@ impl Corner { pub fn update( &mut self, settings: &CursorSettings, - font_dimensions: Point, - destination: Point, + font_dimensions: Point2D, + destination: Point2D, dt: f32, immediate_movement: bool, ) -> bool { @@ -113,7 +118,7 @@ impl Corner { } // Calculate window-space destination for corner - let relative_scaled_position: Point = ( + let relative_scaled_position: Vector2D = ( self.relative_position.x * font_dimensions.x, self.relative_position.y * font_dimensions.y, ) @@ -130,17 +135,9 @@ impl Corner { // Calculate how much a corner will be lagging behind based on how much it's aligned // with the direction of motion. Corners in front will move faster than corners in the // back - let travel_direction = { - let mut d = destination - self.current_position; - d.normalize(); - d - }; + let travel_direction = { (destination - self.current_position).normalize() }; - let corner_direction = { - let mut d = self.relative_position; - d.normalize(); - d - }; + let corner_direction = { self.relative_position.to_vector().normalize() }; let direction_alignment = travel_direction.dot(corner_direction); @@ -172,12 +169,12 @@ impl Corner { pub struct CursorRenderer { pub corners: Vec, cursor: Cursor, - destination: Point, + destination: Point2D, blink_status: BlinkStatus, previous_cursor_shape: Option, previous_editor_mode: EditorMode, - cursor_vfx: Option>, - previous_vfx_mode: cursor_vfx::VfxMode, + //cursor_vfx: Option>, + //previous_vfx_mode: cursor_vfx::VfxMode, window_has_focus: bool, } @@ -190,15 +187,15 @@ impl CursorRenderer { blink_status: BlinkStatus::new(), previous_cursor_shape: None, previous_editor_mode: EditorMode::Normal, - cursor_vfx: None, - previous_vfx_mode: cursor_vfx::VfxMode::Disabled, + //cursor_vfx: None, + //previous_vfx_mode: cursor_vfx::VfxMode::Disabled, window_has_focus: true, }; renderer.set_cursor_shape(&CursorShape::Block, DEFAULT_CELL_PERCENTAGE); renderer } - pub fn handle_event(&mut self, event: &Event<()>) { + pub fn handle_event(&mut self, event: &Event) { if let Event::WindowEvent { event: WindowEvent::Focused(is_focused), .. @@ -251,8 +248,8 @@ impl CursorRenderer { if let Some(window) = windows.get(&self.cursor.parent_window_id) { let grid_x = cursor_grid_x as f32 + window.grid_current_position.x; - let mut grid_y = cursor_grid_y as f32 + window.grid_current_position.y - - (window.current_scroll - window.current_surface.top_line as f32); + let mut grid_y = + cursor_grid_y as f32 + window.grid_current_position.y - window.current_scroll; // Prevent the cursor from targeting a position outside its current window. Since only // the vertical direction is effected by scrolling, we only have to clamp the vertical @@ -271,36 +268,95 @@ impl CursorRenderer { } } - pub fn draw( + /* + pub fn draw(&mut self, grid_renderer: &mut GridRenderer, canvas: &mut Canvas) { + tracy_zone!("cursor_draw"); + let render = self.blink_status.should_render(); + let settings = SETTINGS.get::(); + + let mut paint = Paint::new(skia_safe::colors::WHITE, None); + paint.set_anti_alias(settings.antialiasing); + + let character = self.cursor.grid_cell.0.clone(); + + if !(self.cursor.enabled && render) { + return; + } + // Draw Background + let background_color = self + .cursor + .background(&grid_renderer.default_style.colors) + .to_color() + .with_a(self.cursor.alpha()); + paint.set_color(background_color); + + let path = if self.window_has_focus || self.cursor.shape != CursorShape::Block { + self.draw_rectangle(canvas, &paint) + } else { + let outline_width = settings.unfocused_outline_width * grid_renderer.em_size; + self.draw_rectangular_outline(canvas, &paint, outline_width) + }; + + // Draw foreground + let foreground_color = self + .cursor + .foreground(&grid_renderer.default_style.colors) + .to_color() + .with_a(self.cursor.alpha()); + paint.set_color(foreground_color); + + canvas.save(); + canvas.clip_path(&path, None, Some(false)); + + let y_adjustment = grid_renderer.shaper.y_adjustment(); + let style = &self.cursor.grid_cell.1; + + let bold = style.as_ref().map(|x| x.bold).unwrap_or(false); + let italic = style.as_ref().map(|x| x.italic).unwrap_or(false); + + let blobs = &grid_renderer.shaper.shape_cached(character, bold, italic); + + for blob in blobs.iter() { + canvas.draw_text_blob( + blob, + (self.destination.x, self.destination.y + y_adjustment as f32), + &paint, + ); + } + + canvas.restore(); + + if let Some(vfx) = self.cursor_vfx.as_ref() { + vfx.render(&settings, canvas, grid_renderer, &self.cursor); + } + }*/ + + pub fn animate( &mut self, - grid_renderer: &mut GridRenderer, current_mode: &EditorMode, - canvas: &mut Canvas, + grid_renderer: &GridRenderer, dt: f32, - ) { - let render = self.blink_status.update_status(&self.cursor); + ) -> bool { + tracy_zone!("cursor_animate"); + self.blink_status.update_status(&self.cursor, dt); let settings = SETTINGS.get::(); + /* if settings.vfx_mode != self.previous_vfx_mode { self.cursor_vfx = cursor_vfx::new_cursor_vfx(&settings.vfx_mode); self.previous_vfx_mode = settings.vfx_mode.clone(); } - - let mut paint = Paint::new(skia_safe::colors::WHITE, None); - paint.set_anti_alias(settings.antialiasing); - - let character = self.cursor.grid_cell.0.clone(); + */ let mut cursor_width = grid_renderer.font_dimensions.width; if self.cursor.double_width && self.cursor.shape == CursorShape::Block { cursor_width *= 2; } - let cursor_dimensions: Point = ( + let cursor_dimensions = Vector2D::new( cursor_width as f32, grid_renderer.font_dimensions.height as f32, - ) - .into(); + ); let in_insert_mode = matches!(current_mode, EditorMode::Insert); @@ -319,21 +375,23 @@ impl CursorRenderer { .unwrap_or(DEFAULT_CELL_PERCENTAGE), ); + /* if let Some(vfx) = self.cursor_vfx.as_mut() { vfx.restart(center_destination); } + */ } let mut animating = false; - if !center_destination.is_zero() { + if !center_destination.approx_eq(&Point2D::origin()) { for corner in self.corners.iter_mut() { let immediate_movement = !settings.animate_in_insert_mode && in_insert_mode || !settings.animate_command_line && !changed_to_from_cmdline; let corner_animating = corner.update( &settings, - cursor_dimensions, + cursor_dimensions.to_point(), center_destination, dt, immediate_movement, @@ -342,6 +400,7 @@ impl CursorRenderer { animating |= corner_animating; } + /* let vfx_animating = if let Some(vfx) = self.cursor_vfx.as_mut() { vfx.update(&settings, center_destination, cursor_dimensions, dt) } else { @@ -349,65 +408,15 @@ impl CursorRenderer { }; animating |= vfx_animating; + */ } - if animating { - REDRAW_SCHEDULER.queue_next_frame(); - } else { + if !animating { self.previous_editor_mode = current_mode.clone(); } - if !(self.cursor.enabled && render) { - return; - } - // Draw Background - let background_color = self - .cursor - .background(&grid_renderer.default_style.colors) - .to_color() - .with_a(self.cursor.alpha()); - paint.set_color(background_color); - - let path = if self.window_has_focus || self.cursor.shape != CursorShape::Block { - self.draw_rectangle(canvas, &paint) - } else { - let outline_width = settings.unfocused_outline_width * grid_renderer.em_size; - self.draw_rectangular_outline(canvas, &paint, outline_width) - }; - - // Draw foreground - let foreground_color = self - .cursor - .foreground(&grid_renderer.default_style.colors) - .to_color() - .with_a(self.cursor.alpha()); - paint.set_color(foreground_color); - - canvas.save(); - canvas.clip_path(&path, None, Some(false)); - - let y_adjustment = grid_renderer.shaper.y_adjustment(); - let style = &self.cursor.grid_cell.1; - - let bold = style.as_ref().map(|x| x.bold).unwrap_or(false); - let italic = style.as_ref().map(|x| x.italic).unwrap_or(false); - - let blobs = &grid_renderer.shaper.shape_cached(character, bold, italic); - - for blob in blobs.iter() { - canvas.draw_text_blob( - blob, - (self.destination.x, self.destination.y + y_adjustment as f32), - &paint, - ); - } - - canvas.restore(); - - if let Some(vfx) = self.cursor_vfx.as_ref() { - vfx.render(&settings, canvas, grid_renderer, &self.cursor); - } + animating } - + /* fn draw_rectangle(&self, canvas: &mut Canvas, paint: &Paint) -> Path { // The cursor is made up of four points, so I create a path with each of the four // corners. @@ -457,4 +466,5 @@ impl CursorRenderer { canvas.draw_path(&path, paint); path } + */ } diff --git a/src/renderer/fonts/atlas.rs b/src/renderer/fonts/atlas.rs new file mode 100644 index 000000000..8f96a18c1 --- /dev/null +++ b/src/renderer/fonts/atlas.rs @@ -0,0 +1,221 @@ +use crate::renderer::pipeline::Glyphs; +use enum_map::{enum_map, Enum, EnumMap}; +use euclid::default::{Point2D, Rect, Size2D, Vector2D}; +use std::num::NonZeroU32; +use webrender_api::ImageFormat; +use wgpu::{ + AddressMode, BindGroupDescriptor, BindGroupEntry, BindingResource, BufferAddress, Device, + Extent3d, FilterMode, Origin3d, Queue, SamplerDescriptor, Texture, TextureDescriptor, + TextureDimension, TextureUsages, TextureViewDescriptor, +}; +use wr_glyph_rasterizer::RasterizedGlyph; + +#[derive(Debug, Copy, Clone, Enum)] +pub enum TextureFormat { + R8, + R16, + BGRA8, + RGBAF32, + RG8, + RG16, + RGBAI32, + RGBA8, +} + +impl From for TextureFormat { + fn from(format: ImageFormat) -> TextureFormat { + match format { + ImageFormat::R8 => TextureFormat::R8, + ImageFormat::R16 => TextureFormat::R16, + ImageFormat::BGRA8 => TextureFormat::BGRA8, + ImageFormat::RGBAF32 => TextureFormat::RGBAF32, + ImageFormat::RG8 => TextureFormat::RG8, + ImageFormat::RG16 => TextureFormat::RG16, + ImageFormat::RGBAI32 => TextureFormat::RGBAI32, + ImageFormat::RGBA8 => TextureFormat::RGBA8, + } + } +} + +impl TextureFormat { + fn bytes_per_pixel(&self) -> u32 { + self.to_image_format().bytes_per_pixel() as u32 + } + + fn to_image_format(&self) -> ImageFormat { + match self { + TextureFormat::R8 => ImageFormat::R8, + TextureFormat::R16 => ImageFormat::R16, + TextureFormat::BGRA8 => ImageFormat::BGRA8, + TextureFormat::RGBAF32 => ImageFormat::RGBAF32, + TextureFormat::RG8 => ImageFormat::RG8, + TextureFormat::RG16 => ImageFormat::RG16, + TextureFormat::RGBAI32 => ImageFormat::RGBAI32, + TextureFormat::RGBA8 => ImageFormat::RGBA8, + } + } + + fn to_wgpu(&self) -> wgpu::TextureFormat { + match self { + TextureFormat::R8 => wgpu::TextureFormat::R8Unorm, + TextureFormat::R16 => wgpu::TextureFormat::R16Unorm, + TextureFormat::BGRA8 => wgpu::TextureFormat::Bgra8Unorm, + TextureFormat::RGBAF32 => wgpu::TextureFormat::Rgba32Float, + TextureFormat::RG8 => wgpu::TextureFormat::Rg8Unorm, + TextureFormat::RG16 => wgpu::TextureFormat::Rg16Unorm, + TextureFormat::RGBAI32 => wgpu::TextureFormat::Rgba32Sint, + TextureFormat::RGBA8 => wgpu::TextureFormat::Rgba8Unorm, + } + } +} + +pub struct AtlasCoordinate { + pub rect: Rect, + pub texture_id: u32, +} + +pub struct AtlasTexture { + pub texture: Texture, + texture_size: Extent3d, + cpu_buffer: Vec, + bytes_per_pixel: u32, + current_pos: Point2D, + current_row_height: u32, + upload_pos: Origin3d, + dirty: bool, +} + +impl AtlasTexture { + pub fn new(device: &Device, texture_format: TextureFormat) -> Self { + let width = 4096; + let height = 4096; + let texture_size = Extent3d { + width, + height, + depth_or_array_layers: 1, + }; + let texture = device.create_texture(&TextureDescriptor { + size: texture_size, + mip_level_count: 1, + sample_count: 1, + dimension: TextureDimension::D2, + format: texture_format.to_wgpu(), + usage: TextureUsages::TEXTURE_BINDING | TextureUsages::COPY_DST, + label: Some("Glyph Atlas"), + }); + let bytes_per_pixel = texture_format.bytes_per_pixel(); + let buffer_size = (width * height) * bytes_per_pixel; + let mut cpu_buffer = Vec::with_capacity(buffer_size as usize); + unsafe { + cpu_buffer.set_len(buffer_size as usize); + } + + Self { + texture, + texture_size, + cpu_buffer, + bytes_per_pixel, + current_pos: Point2D::zero(), + current_row_height: 0, + upload_pos: Origin3d::ZERO, + dirty: false, + } + } + + fn add_glyph(&mut self, glyph: &RasterizedGlyph) -> AtlasCoordinate { + let width = glyph.width as u32; + let height = glyph.height as u32; + if self.current_pos.x + width > self.texture_size.width { + self.current_pos.y += self.current_row_height; + self.current_row_height = 0; + }; + let mut rect = Rect::new(self.current_pos, Size2D::new(width - 1, height - 1)).to_f32(); + rect = rect.translate(Vector2D::new(0.5, 0.5)); + rect = rect.scale( + 1.0 / self.texture_size.width as f32, + 1.0 / self.texture_size.height as f32, + ); + + let row_start_byte = (self.current_pos.x * self.bytes_per_pixel) as usize; + let row_end_byte = ((self.current_pos.x + width) * self.bytes_per_pixel) as usize; + let dst_rows = self + .cpu_buffer + .chunks_mut((self.texture_size.width * self.bytes_per_pixel) as usize) + .map(|row| &mut row[row_start_byte..row_end_byte]); + let src_rows = glyph.bytes.chunks((width * self.bytes_per_pixel) as usize); + for (src_row, dst_row) in src_rows.zip(dst_rows) { + dst_row.copy_from_slice(src_row); + } + self.current_pos.x += width; + self.current_row_height = self.current_row_height.max(height); + self.dirty = true; + + AtlasCoordinate { + rect, + texture_id: 0, + } + } + + fn upload(&mut self, queue: &Queue) { + if !self.dirty { + return; + } + + let start_byte = self.upload_pos.y * self.bytes_per_pixel as u32; + let copy_extent = Extent3d { + width: self.texture_size.width, + height: (self.current_pos.y + self.current_row_height) as u32 - self.upload_pos.y, + depth_or_array_layers: 1, + }; + + queue.write_texture( + wgpu::ImageCopyTexture { + texture: &self.texture, + mip_level: 0, + origin: self.upload_pos, + aspect: wgpu::TextureAspect::All, + }, + &self.cpu_buffer + [0..(copy_extent.height * copy_extent.width * self.bytes_per_pixel) as usize], + wgpu::ImageDataLayout { + offset: (self.upload_pos.y * self.bytes_per_pixel) as BufferAddress, + bytes_per_row: NonZeroU32::new( + self.bytes_per_pixel as u32 * self.texture_size.width, + ), + rows_per_image: None, + }, + copy_extent, + ); + // Always make sure that we re-upload the current row + self.upload_pos.y += copy_extent.height - self.current_row_height as u32; + self.dirty = false; + } +} + +pub struct Atlas { + pub textures: EnumMap>, +} + +impl Atlas { + pub fn new() -> Self { + let textures = EnumMap::default(); + Self { textures } + } + + pub fn add_glyph(&mut self, device: &Device, glyph: &RasterizedGlyph) -> AtlasCoordinate { + let can_use_rgb8 = true; + let texture_format = glyph.format.image_format(can_use_rgb8).into(); + let textures = &mut self.textures[texture_format]; + if textures.is_empty() { + textures.push(AtlasTexture::new(device, texture_format)); + } + let mut texture = textures.last_mut().unwrap(); + texture.add_glyph(glyph) + } + + pub fn upload(&mut self, queue: &Queue) { + for texture in self.textures.values_mut().flat_map(|v| v.iter_mut()) { + texture.upload(queue) + } + } +} diff --git a/src/renderer/fonts/caching_shaper.rs b/src/renderer/fonts/caching_shaper.rs index ac77f77a0..c76ceacb0 100644 --- a/src/renderer/fonts/caching_shaper.rs +++ b/src/renderer/fonts/caching_shaper.rs @@ -1,22 +1,25 @@ use std::sync::Arc; +use euclid::default::Point2D; use log::{debug, error, trace, warn}; use lru::LruCache; -use skia_safe::{ - graphics::{font_cache_limit, font_cache_used, set_font_cache_limit}, - TextBlob, TextBlobBuilder, -}; +use skia_safe::graphics::{font_cache_limit, font_cache_used, set_font_cache_limit}; use swash::{ shape::ShapeContext, text::{ cluster::{CharCluster, Parser, Status, Token}, Script, }, - Metrics, + GlyphId, Metrics, }; use unicode_segmentation::UnicodeSegmentation; +use webrender_api::units::DevicePoint; +use wgpu::{Device, Queue}; +use wr_glyph_rasterizer::{GlyphKey, SubpixelDirection}; -use crate::renderer::fonts::{font_loader::*, font_options::*}; +use super::atlas::AtlasCoordinate; +use crate::profiling::tracy_zone; +use crate::renderer::fonts::{atlas::Atlas, font_loader::*, font_options::*, glyph_cache::*}; #[derive(new, Clone, Hash, PartialEq, Eq, Debug)] struct ShapeKey { @@ -25,10 +28,15 @@ struct ShapeKey { pub italic: bool, } +pub struct ShapeResult { + pub glyph_id: u32, + pub position: Point2D, +} + pub struct CachingShaper { options: FontOptions, font_loader: FontLoader, - blob_cache: LruCache>, + blob_cache: LruCache>, shape_context: ShapeContext, scale_factor: f32, fudge_factor: f32, @@ -340,11 +348,11 @@ impl CachingShaper { } } - pub fn shape(&mut self, text: String, bold: bool, italic: bool) -> Vec { + pub fn shape(&mut self, text: String, bold: bool, italic: bool) -> Vec { let current_size = self.current_size(); let (glyph_width, ..) = self.font_base_dimensions(); - let mut resulting_blobs = Vec::new(); + let mut result = Vec::new(); trace!("Shaping text: {}", text); @@ -361,37 +369,30 @@ impl CachingShaper { shaper.add_cluster(&cluster); } - let mut glyph_data = Vec::new(); - shaper.shape_with(|glyph_cluster| { for glyph in glyph_cluster.glyphs { - let position = ((glyph.data as u64 * glyph_width) as f32, glyph.y); - glyph_data.push((glyph.id, position)); + let position = Point2D::new((glyph.data as u64 * glyph_width) as f32, glyph.y); + let glyph_key = GlyphKey::new( + glyph.id.into(), + DevicePoint::new(0.0, 0.0), + SubpixelDirection::None, + ); + let glyph_id = self + .font_loader + .glyph_cache + .get_glyph(&font_pair, glyph_key); + result.push(ShapeResult { glyph_id, position }); } }); - - if glyph_data.is_empty() { - continue; - } - - let mut blob_builder = TextBlobBuilder::new(); - let (glyphs, positions) = - blob_builder.alloc_run_pos(&font_pair.skia_font, glyph_data.len(), None); - for (i, (glyph_id, glyph_position)) in glyph_data.iter().enumerate() { - glyphs[i] = *glyph_id; - positions[i] = (*glyph_position).into(); - } - - let blob = blob_builder.make(); - resulting_blobs.push(blob.expect("Could not create textblob")); } self.adjust_font_cache_size(); - resulting_blobs + result } - pub fn shape_cached(&mut self, text: String, bold: bool, italic: bool) -> &Vec { + pub fn shape_cached(&mut self, text: String, bold: bool, italic: bool) -> &Vec { + tracy_zone!("shape_cached"); let key = ShapeKey::new(text.clone(), bold, italic); if !self.blob_cache.contains(&key) { @@ -401,4 +402,16 @@ impl CachingShaper { self.blob_cache.get(&key).unwrap() } + + pub fn process(&mut self, device: &Device, queue: &Queue) { + self.font_loader.glyph_cache.process(device, queue); + } + + pub fn get_glyph_coordinate(&self, glyph: u32) -> &Option { + &self.font_loader.glyph_cache.get_glyph_coordinate(glyph) + } + + pub fn get_atlas(&self) -> &Atlas { + &self.font_loader.glyph_cache.atlas + } } diff --git a/src/renderer/fonts/font_loader.rs b/src/renderer/fonts/font_loader.rs index 0a36a9a85..f75e12b72 100644 --- a/src/renderer/fonts/font_loader.rs +++ b/src/renderer/fonts/font_loader.rs @@ -6,9 +6,17 @@ use skia_safe::{ font::Edging as SkiaEdging, Data, Font, FontHinting as SkiaHinting, FontMgr, FontStyle, Typeface, }; +use webrender_api::{ + FontInstanceKey, FontInstanceOptions, FontInstancePlatformOptions, FontKey as ApiFontKey, + FontRenderMode, FontTemplate, IdNamespace, +}; +use wr_glyph_rasterizer::{BaseFontInstance, FontInstance}; -use crate::renderer::fonts::font_options::{FontEdging, FontHinting}; -use crate::renderer::fonts::swash_font::SwashFont; +use super::{ + font_options::{FontEdging, FontHinting}, + glyph_cache::GlyphCache, + swash_font::SwashFont, +}; static DEFAULT_FONT: &[u8] = include_bytes!("../../../assets/fonts/FiraCodeNerdFont-Regular.ttf"); static LAST_RESORT_FONT: &[u8] = include_bytes!("../../../assets/fonts/LastResort-Regular.ttf"); @@ -17,22 +25,47 @@ pub struct FontPair { pub key: FontKey, pub skia_font: Font, pub swash_font: SwashFont, + pub api_key: ApiFontKey, + pub template: FontTemplate, + pub base_instance: Arc, } impl FontPair { - fn new(key: FontKey, mut skia_font: Font) -> Option { + fn new(key: FontKey, api_key: ApiFontKey, mut skia_font: Font) -> Option { skia_font.set_subpixel(true); skia_font.set_hinting(font_hinting(&key.hinting)); skia_font.set_edging(font_edging(&key.edging)); let typeface = skia_font.typeface().unwrap(); let (font_data, index) = typeface.to_font_data().unwrap(); - let swash_font = SwashFont::from_data(font_data, index)?; + let swash_font = SwashFont::from_data(font_data.clone(), index)?; + let template = FontTemplate::Raw(Arc::new(font_data), index as u32); + + let instance_key = FontInstanceKey(api_key.0, api_key.1); + let size = skia_font.size().into(); + let options = FontInstanceOptions { + render_mode: FontRenderMode::Alpha, // TODO: Enable other render modes + ..Default::default() + }; + let platform_options = Some(FontInstancePlatformOptions::default()); //TODO: Set the correct + let variations = Vec::new(); + + let base_instance = Arc::new(BaseFontInstance { + instance_key, + font_key: api_key, + size, + options, + platform_options, + variations, + }); Some(Self { key, skia_font, swash_font, + api_key, + template, + base_instance, }) } } @@ -59,6 +92,9 @@ pub struct FontLoader { cache: LruCache>, font_size: f32, last_resort: Option>, + pub glyph_cache: GlyphCache, + namespace: IdNamespace, + next_id: u32, } impl FontLoader { @@ -68,20 +104,48 @@ impl FontLoader { cache: LruCache::new(20), font_size, last_resort: None, + glyph_cache: GlyphCache::new(), + namespace: IdNamespace(0), + next_id: 0, } } + fn new_api_key(&mut self) -> ApiFontKey { + let id = self.next_id; + self.next_id += 1; + ApiFontKey(self.namespace, id) + } + fn load(&mut self, font_key: FontKey) -> Option { let font_style = font_style(font_key.bold, font_key.italic); trace!("Loading font {:?}", font_key); if let Some(family_name) = &font_key.family_name { let typeface = self.font_mgr.match_family_style(family_name, font_style)?; - FontPair::new(font_key, Font::from_typeface(typeface, self.font_size)) + FontPair::new( + font_key, + self.new_api_key(), + Font::from_typeface(typeface, self.font_size), + ) } else { let data = Data::new_copy(DEFAULT_FONT); let typeface = Typeface::from_data(data, 0).unwrap(); - FontPair::new(font_key, Font::from_typeface(typeface, self.font_size)) + FontPair::new( + font_key, + self.new_api_key(), + Font::from_typeface(typeface, self.font_size), + ) + } + } + + fn put_to_cache(&mut self, font_key: FontKey, font_arch: Arc) { + self.glyph_cache + .rasterizer + .add_font(font_arch.api_key, font_arch.template.clone()); + if let Some(removed_font) = self.cache.push(font_key, font_arch) { + self.glyph_cache + .rasterizer + .delete_font(removed_font.1.api_key); } } @@ -94,7 +158,7 @@ impl FontLoader { let font_arc = Arc::new(loaded_font); - self.cache.put(font_key.clone(), font_arc.clone()); + self.put_to_cache(font_key.clone(), font_arc.clone()); Some(font_arc) } @@ -120,10 +184,11 @@ impl FontLoader { let font_pair = Arc::new(FontPair::new( font_key.clone(), + self.new_api_key(), Font::from_typeface(typeface, self.font_size), )?); - self.cache.put(font_key, font_pair.clone()); + self.put_to_cache(font_key, font_pair.clone()); Some(font_pair) } @@ -136,8 +201,12 @@ impl FontLoader { let data = Data::new_copy(LAST_RESORT_FONT); let typeface = Typeface::from_data(data, 0).unwrap(); - let font_pair = - FontPair::new(font_key, Font::from_typeface(typeface, self.font_size)).unwrap(); + let font_pair = FontPair::new( + font_key, + self.new_api_key(), + Font::from_typeface(typeface, self.font_size), + ) + .unwrap(); let font_pair = Arc::new(font_pair); self.last_resort = Some(font_pair.clone()); diff --git a/src/renderer/fonts/glyph_cache.rs b/src/renderer/fonts/glyph_cache.rs new file mode 100644 index 000000000..ac9b0e9e4 --- /dev/null +++ b/src/renderer/fonts/glyph_cache.rs @@ -0,0 +1,86 @@ +use super::atlas::{Atlas, AtlasCoordinate}; +use super::font_loader::FontPair; +use log::trace; +use rayon::ThreadPoolBuilder; +use std::collections::HashMap; +use std::sync::Arc; +use webrender_api::FontKey; +use wgpu::{Device, Queue}; +use wr_glyph_rasterizer::{ + profiler::GlyphRasterizeProfiler, FontInstance, GlyphKey, GlyphRasterizer, +}; + +type CachedGlyphKey = (FontKey, GlyphKey); + +pub struct GlyphCache { + pub rasterizer: GlyphRasterizer, + glyphs: HashMap, + glyph_coordinates: Vec>, + pub atlas: Atlas, +} + +struct Profiler; + +impl GlyphRasterizeProfiler for Profiler { + fn start_time(&mut self) {} + fn end_time(&mut self) -> f64 { + 0. + } + fn set(&mut self, _value: f64) {} +} + +impl GlyphCache { + pub fn new() -> Self { + // Leave 2 cores free for other tasks, but always spawn at least 2 workers + let num_threads = (num_cpus::get() - 2).max(2); + let workers = { + let worker = ThreadPoolBuilder::new() + .thread_name(|idx| format!("WRWorker#{}", idx)) + .num_threads(num_threads) + .build(); + Arc::new(worker.unwrap()) + }; + let rasterizer = GlyphRasterizer::new(workers, true); + let atlas = Atlas::new(); + Self { + rasterizer, + glyphs: HashMap::new(), + atlas, + glyph_coordinates: Vec::new(), + } + } + + pub fn get_glyph(&mut self, font: &FontPair, id: GlyphKey) -> u32 { + let key = (font.api_key, id); + *self.glyphs.entry(key).or_insert_with(|| { + let font_instance = FontInstance::from_base(font.base_instance.clone()); + self.rasterizer + .request_glyphs(font_instance, &[id], |_| true); + let glyph_id = self.glyph_coordinates.len(); + self.glyph_coordinates.push(None); + glyph_id as u32 + }) + } + + pub fn process(&mut self, device: &Device, queue: &Queue) { + self.rasterizer.resolve_glyphs( + |job, _| { + let key = (job.font.base.font_key, job.key); + let glyph_id = self.glyphs.get(&key).unwrap(); + let glyph_coordinate = if let Ok(glyph) = job.result { + trace!("Glyph width {}, height {}", glyph.width, glyph.height); + Some(self.atlas.add_glyph(device, &glyph)) + } else { + None + }; + self.glyph_coordinates[*glyph_id as usize] = glyph_coordinate; + }, + &mut Profiler, + ); + self.atlas.upload(queue); + } + + pub fn get_glyph_coordinate(&self, glyph: u32) -> &Option { + &self.glyph_coordinates[glyph as usize] + } +} diff --git a/src/renderer/fonts/mod.rs b/src/renderer/fonts/mod.rs index f1b346a31..96db26943 100644 --- a/src/renderer/fonts/mod.rs +++ b/src/renderer/fonts/mod.rs @@ -1,4 +1,6 @@ +pub mod atlas; pub mod caching_shaper; pub mod font_loader; mod font_options; +pub mod glyph_cache; mod swash_font; diff --git a/src/renderer/grid_renderer.rs b/src/renderer/grid_renderer.rs index 40f2f8702..b3fece745 100644 --- a/src/renderer/grid_renderer.rs +++ b/src/renderer/grid_renderer.rs @@ -1,22 +1,35 @@ use std::sync::Arc; -use glutin::dpi::PhysicalSize; use log::trace; +/* use skia_safe::{ colors, dash_path_effect, BlendMode, Canvas, Color, Paint, Path, Point, Rect, HSV, }; +*/ +use csscolorparser::Color; +use euclid::{default::Rect, rect, Point2D, Vector2D}; +use swash::shape::cluster::Glyph; +use winit::dpi::PhysicalSize; use crate::{ dimensions::Dimensions, editor::{Colors, Style, UnderlineStyle}, - renderer::{CachingShaper, RendererSettings}, + profiling::tracy_zone, + renderer::{pipeline::BackgroundFragment, CachingShaper, RendererSettings}, settings::*, - window::WindowSettings, }; +#[derive(Clone)] +pub struct GlyphPlaceholder { + pub position: [f32; 2], + pub width: f32, + pub color: [f32; 4], + pub id: u32, +} + pub struct GridRenderer { pub shaper: CachingShaper, - pub paint: Paint, + //pub paint: Paint, pub default_style: Arc