From 06c3fcd5273e5010e83a9da77202e79b9d2c465e Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Sun, 8 Oct 2023 14:14:49 +0200 Subject: [PATCH 01/15] update to wgpu 0.18 --- Cargo.lock | 323 ++++++++++++------ Cargo.toml | 10 +- crates/re_renderer/examples/framework.rs | 5 +- .../re_renderer/src/draw_phases/outlines.rs | 12 +- .../src/draw_phases/picking_layer.rs | 10 +- .../re_renderer/src/draw_phases/screenshot.rs | 4 +- crates/re_renderer/src/view_builder.rs | 6 +- 7 files changed, 257 insertions(+), 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 567747fa11c5..3f9d0a9c22ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,7 +75,7 @@ dependencies = [ "arrayvec", "once_cell", "paste", - "windows", + "windows 0.44.0", ] [[package]] @@ -119,9 +119,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", "getrandom", @@ -303,7 +303,7 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f73029049896b3d70ba17756afef171ceef3569016cfa9dbca58d29e0e16f9" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "arrow-format", "bytemuck", "chrono", @@ -328,7 +328,7 @@ version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ - "libloading", + "libloading 0.7.4", ] [[package]] @@ -1277,7 +1277,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ "bitflags 2.3.1", - "libloading", + "libloading 0.8.1", "winapi", ] @@ -1375,7 +1375,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" dependencies = [ - "libloading", + "libloading 0.7.4", ] [[package]] @@ -1411,8 +1411,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf4e52dbbb615cfd30cf5a5265335c217b5fd8d669593cea74a517d9c605af" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "bytemuck", "serde", @@ -1421,8 +1420,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d9efede6c8905d3fc51a5ec9a506d4da4011bbcae0253d0304580fe40af3f5" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "bytemuck", "cocoa", @@ -1455,11 +1453,10 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd69fed5fcf4fbb8225b24e80ea6193b61e17a625db105ef0c4d71dde6eb8b7" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "accesskit", - "ahash 0.8.5", + "ahash 0.8.6", "backtrace", "epaint", "log", @@ -1472,8 +1469,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d4c9ab93d9528c184ef1d695c8c99b2e6d50833696ec3f513063efeee0fe77" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "bytemuck", "epaint", @@ -1488,8 +1484,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15479a96d9fadccf5dac690bdc6373b97b8e1c0dd28367058f25a5298da0195" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "accesskit_winit", "arboard", @@ -1534,13 +1529,12 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6726c08798822280038bbad2e32f4fc3cbed800cd51c6e34e99cd2d60cc1bc" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "bytemuck", "egui", "egui-winit", - "glow", + "glow 0.12.3", "log", "memoffset 0.6.5", "puffin", @@ -1563,7 +1557,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54986fb00d53325eaa4033cb5d8b1c1a77d4173fa3ed0d6602c6a542b151ace9" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "egui", "itertools 0.11.0", "log", @@ -1595,8 +1589,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef2b29de53074e575c18b694167ccbe6e5191f7b25fe65175a0d905a32eeec0" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "bytemuck", "serde", @@ -1698,11 +1691,10 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58067b840d009143934d91d8dcb8ded054d8301d7c11a517ace0a99bb1e1595e" +source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" dependencies = [ "ab_glyph", - "ahash 0.8.5", + "ahash 0.8.6", "bytemuck", "ecolor", "emath", @@ -1712,6 +1704,12 @@ dependencies = [ "serde", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -1850,6 +1848,18 @@ dependencies = [ "miniz_oxide 0.7.1", ] +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2065,6 +2075,17 @@ version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + [[package]] name = "glam" version = "0.22.0" @@ -2105,6 +2126,18 @@ dependencies = [ "web-sys", ] +[[package]] +name = "glow" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "886c2a30b160c4c6fec8f987430c26b526b7988ca71f664e6a699ddf6f9601e4" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gltf" version = "1.1.0" @@ -2143,6 +2176,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + [[package]] name = "gpu-alloc" version = "0.6.0" @@ -2164,15 +2206,16 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +checksum = "40fe17c8a05d60c38c0a4e5a3c802f2f1ceb66b76c67d96ffb34bef0475a7fad" dependencies = [ "backtrace", "log", + "presser", "thiserror", "winapi", - "windows", + "windows 0.51.1", ] [[package]] @@ -2207,7 +2250,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2252,10 +2295,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "rayon", ] +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "hassle-rs" version = "0.10.0" @@ -2265,7 +2314,7 @@ dependencies = [ "bitflags 1.3.2", "com-rs", "libc", - "libloading", + "libloading 0.7.4", "thiserror", "widestring", "winapi", @@ -2440,6 +2489,16 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + [[package]] name = "indoc" version = "1.0.9" @@ -2601,15 +2660,21 @@ dependencies = [ [[package]] name = "khronos-egl" -version = "4.1.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading", + "libloading 0.8.1", "pkg-config", ] +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "kqueue" version = "1.0.7" @@ -2731,6 +2796,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "libm" version = "0.2.7" @@ -2896,9 +2971,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ "bitflags 2.3.1", "block", @@ -3026,15 +3101,15 @@ dependencies = [ [[package]] name = "naga" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" +checksum = "61d829abac9f5230a85d8cc83ec0879b4c09790208ae25b5ea031ef84562e071" dependencies = [ "bit-set", "bitflags 2.3.1", "codespan-reporting", "hexf-parse", - "indexmap", + "indexmap 2.1.0", "log", "num-traits", "rustc-hash", @@ -3044,6 +3119,15 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + [[package]] name = "ndarray" version = "0.15.6" @@ -3494,7 +3578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -3591,14 +3675,14 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caa1f5af0505c67333487c1287f29644c172afbab7374e48a77843646064411c" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "arrow2", "bitflags 1.3.2", "chrono", "comfy-table", "either", "hashbrown 0.13.2", - "indexmap", + "indexmap 1.9.3", "num-traits", "once_cell", "polars-arrow", @@ -3702,6 +3786,12 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + [[package]] name = "prettyplease" version = "0.1.25" @@ -4035,7 +4125,7 @@ dependencies = [ name = "re_arrow_store" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "arrow2", "criterion", @@ -4143,7 +4233,7 @@ dependencies = [ name = "re_data_ui" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "bytemuck", "egui", @@ -4235,7 +4325,7 @@ dependencies = [ name = "re_log_types" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "arrow2", "backtrace", @@ -4272,7 +4362,7 @@ dependencies = [ name = "re_memory" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "backtrace", "emath", "itertools 0.11.0", @@ -4316,7 +4406,7 @@ dependencies = [ name = "re_renderer" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "arrow2", "async-executor", @@ -4369,7 +4459,7 @@ dependencies = [ name = "re_sdk" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "crossbeam", "document-features", @@ -4402,7 +4492,7 @@ dependencies = [ name = "re_sdk_comms" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "crossbeam", "document-features", "rand", @@ -4460,7 +4550,7 @@ dependencies = [ name = "re_space_view_spatial" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "bytemuck", "criterion", @@ -4494,7 +4584,7 @@ dependencies = [ name = "re_space_view_tensor" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "bytemuck", "egui", @@ -4575,7 +4665,7 @@ dependencies = [ name = "re_string_interner" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "nohash-hasher", "once_cell", "parking_lot 0.12.1", @@ -4586,7 +4676,7 @@ dependencies = [ name = "re_tensor_ops" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "ndarray", "re_types", "serde", @@ -4731,7 +4821,7 @@ dependencies = [ name = "re_viewer" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "bytemuck", "cfg-if", @@ -4788,7 +4878,7 @@ dependencies = [ name = "re_viewer_context" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "anyhow", "arboard", "bytemuck", @@ -4824,7 +4914,7 @@ dependencies = [ name = "re_viewport" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "arrow2", "egui", "egui_tiles", @@ -4997,7 +5087,7 @@ dependencies = [ name = "rerun_c" version = "0.10.0" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", "arrow2", "once_cell", "parking_lot 0.12.1", @@ -5068,7 +5158,7 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", + "spin 0.5.2", "untrusted", "web-sys", "winapi", @@ -5474,7 +5564,7 @@ version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" dependencies = [ - "indexmap", + "indexmap 1.9.3", "itoa", "ryu", "serde", @@ -5667,6 +5757,15 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + [[package]] name = "spirv" version = "0.2.0+1.5.4" @@ -5963,7 +6062,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b450e3ba06251ec4fc76917dafeaf55805ffb26dbf7d5500bfb9511ce63a0d1f" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.6", ] [[package]] @@ -6033,7 +6132,7 @@ version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ - "indexmap", + "indexmap 1.9.3", "toml_datetime", "winnow", ] @@ -6668,12 +6767,13 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "wgpu" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7472f3b69449a8ae073f6ec41d05b6f846902d92a6c45313c50cb25857b736ce" +checksum = "30e7d227c9f961f2061c26f4cb0fbd4df0ef37e056edd0931783599d6c94ef24" dependencies = [ "arrayvec", "cfg-if", + "flume", "js-sys", "log", "naga", @@ -6692,9 +6792,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf7454d9386f602f7399225c92dd2fbdcde52c519bc8fb0bd6fbeb388075dc2" +checksum = "837e02ddcdc6d4a9b56ba4598f7fd4202a7699ab03f6ef4dcdebfad2c966aea6" dependencies = [ "arrayvec", "bit-vec", @@ -6715,9 +6815,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6654a13885a17f475e8324efb46dc6986d7aaaa98353330f8de2077b153d0101" +checksum = "1e30b9a8155c83868e82a8c5d3ce899de6c3961d2ef595de8fc168a1677fc2d8" dependencies = [ "android_system_properties", "arrayvec", @@ -6727,7 +6827,8 @@ dependencies = [ "block", "core-graphics-types", "d3d12", - "glow", + "glow 0.13.0", + "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", @@ -6735,11 +6836,12 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.1", "log", "metal", "naga", "objc", + "once_cell", "parking_lot 0.12.1", "profiling", "range-alloc", @@ -6756,9 +6858,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67" +checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" dependencies = [ "bitflags 2.3.1", "js-sys", @@ -6833,6 +6935,25 @@ dependencies = [ "windows-targets 0.42.2", ] +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-implement" version = "0.44.0" @@ -6870,7 +6991,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -6890,17 +7011,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -6911,9 +7032,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -6923,9 +7044,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -6935,9 +7056,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -6947,9 +7068,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -6959,9 +7080,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -6971,9 +7092,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -6983,9 +7104,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winit" @@ -7185,18 +7306,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.11" +version = "0.7.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c19fae0c8a9efc6a8281f2e623db8af1db9e57852e04cde3e754dd2dc29340f" +checksum = "686b7e407015242119c33dab17b8f61ba6843534de936d94368856528eae4dcc" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.11" +version = "0.7.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc56589e9ddd1f1c28d4b4b5c773ce232910a6bb67a70133d61c9e347585efe9" +checksum = "020f3dfe25dfc38dfea49ce62d5d45ecdd7f0d8a724fa63eb36b6eba4ec76806" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 2d03f405f726..8620e7001150 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -198,8 +198,8 @@ webbrowser = "0.8" winit = "0.28.7" # TODO(andreas): Try to get rid of `fragile-send-sync-non-atomic-wasm`. This requires re_renderer being aware of single-thread restriction on resources. # See also https://gpuweb.github.io/gpuweb/explainer/#multithreading-transfer (unsolved part of the Spec as of writing!) -wgpu = { version = "0.17.0", features = ["fragile-send-sync-non-atomic-wasm"] } -wgpu-core = "0.17.0" +wgpu = { version = "0.18.0", features = ["fragile-send-sync-non-atomic-wasm"] } +wgpu-core = "0.18.0" xshell = "0.2" zip = { version = "0.6", default-features = false } zune-core = "0.2" @@ -230,3 +230,9 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. +ecolor = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +eframe = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +egui = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +emath = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +epaint = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } diff --git a/crates/re_renderer/examples/framework.rs b/crates/re_renderer/examples/framework.rs index 95631e2da1e3..c6ffe763275b 100644 --- a/crates/re_renderer/examples/framework.rs +++ b/crates/re_renderer/examples/framework.rs @@ -113,6 +113,7 @@ impl Application { let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { backends: supported_backends(), dx12_shader_compiler: wgpu::Dx12Compiler::Fxc, + gles_minor_version: wgpu::Gles3MinorVersion::Automatic, }); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] let surface = unsafe { instance.create_surface(&window) }.unwrap(); @@ -282,10 +283,12 @@ impl Application { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::BLACK), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, }); for draw_result in &draw_results { diff --git a/crates/re_renderer/src/draw_phases/outlines.rs b/crates/re_renderer/src/draw_phases/outlines.rs index 66ff1b5e891e..e57e35511791 100644 --- a/crates/re_renderer/src/draw_phases/outlines.rs +++ b/crates/re_renderer/src/draw_phases/outlines.rs @@ -354,17 +354,19 @@ impl OutlineMaskProcessor { resolve_target: None, // We're going to do a manual resolve. ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { view: &self.mask_depth.default_view, depth_ops: Some(wgpu::Operations { load: ViewBuilder::DEFAULT_DEPTH_CLEAR, - store: false, + store: wgpu::StoreOp::Discard, }), stencil_ops: None, }), + timestamp_writes: None, + occlusion_query_set: None, }) } @@ -377,7 +379,7 @@ impl OutlineMaskProcessor { let ops = wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), // Clear is the closest to "don't care" - store: true, + store: wgpu::StoreOp::Store, }; // Initialize the jump flooding into voronoi texture 0 by looking at the mask texture. @@ -390,6 +392,8 @@ impl OutlineMaskProcessor { ops, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, }); let render_pipeline_init = @@ -412,6 +416,8 @@ impl OutlineMaskProcessor { ops, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, }); jumpflooding_step.set_pipeline(render_pipeline_step); diff --git a/crates/re_renderer/src/draw_phases/picking_layer.rs b/crates/re_renderer/src/draw_phases/picking_layer.rs index cdd738270c51..c11ca73f4271 100644 --- a/crates/re_renderer/src/draw_phases/picking_layer.rs +++ b/crates/re_renderer/src/draw_phases/picking_layer.rs @@ -321,17 +321,19 @@ impl PickingLayerProcessor { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), - store: true, // Store for readback! + store: wgpu::StoreOp::Store, // Store for readback! }, })], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { view: &self.picking_depth_target.default_view, depth_ops: Some(wgpu::Operations { load: ViewBuilder::DEFAULT_DEPTH_CLEAR, - store: true, // Store for readback! + store: wgpu::StoreOp::Store, // Store for readback! }), stencil_ops: None, }), + timestamp_writes: None, + occlusion_query_set: None, }); pass.set_bind_group(0, &self.bind_group_0, &[]); @@ -590,10 +592,12 @@ impl DepthReadbackWorkaround { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), - store: true, // Store for readback! + store: wgpu::StoreOp::Store, // Store for readback! }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, }); let pipeline = pools.render_pipelines.get_resource(self.render_pipeline)?; diff --git a/crates/re_renderer/src/draw_phases/screenshot.rs b/crates/re_renderer/src/draw_phases/screenshot.rs index b5759245ed9e..28a46398f9e9 100644 --- a/crates/re_renderer/src/draw_phases/screenshot.rs +++ b/crates/re_renderer/src/draw_phases/screenshot.rs @@ -88,10 +88,12 @@ impl ScreenshotProcessor { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, }); pass diff --git a/crates/re_renderer/src/view_builder.rs b/crates/re_renderer/src/view_builder.rs index f46f2752c706..07dc9e4d6b33 100644 --- a/crates/re_renderer/src/view_builder.rs +++ b/crates/re_renderer/src/view_builder.rs @@ -556,17 +556,19 @@ impl ViewBuilder { }), // Don't care about the result, it's going to be resolved to the resolve target. // This can have be much better perf, especially on tiler gpus. - store: false, + store: wgpu::StoreOp::Discard, }, })], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { view: &setup.depth_buffer.default_view, depth_ops: Some(wgpu::Operations { load: Self::DEFAULT_DEPTH_CLEAR, - store: false, + store: wgpu::StoreOp::Discard, }), stencil_ops: None, }), + timestamp_writes: None, + occlusion_query_set: None, }); pass.set_bind_group(0, &setup.bind_group_0, &[]); From 08ea77a0076805d541beb5f17497bcac3a3dc6e9 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 1 Nov 2023 11:53:39 +0100 Subject: [PATCH 02/15] fix formatting --- Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8620e7001150..bc5b8fec2518 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -230,9 +230,9 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -eframe = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -egui = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -emath = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -epaint = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +ecolor = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +eframe = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +egui = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +emath = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +epaint = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } From 1eb419106b35051f35d8adeb1549b0393fb6b0d6 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 1 Nov 2023 11:53:46 +0100 Subject: [PATCH 03/15] fix re_renderer examples --- crates/re_renderer/examples/framework.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/re_renderer/examples/framework.rs b/crates/re_renderer/examples/framework.rs index c6ffe763275b..04049cfacf41 100644 --- a/crates/re_renderer/examples/framework.rs +++ b/crates/re_renderer/examples/framework.rs @@ -112,6 +112,7 @@ impl Application { let size = window.inner_size(); let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { backends: supported_backends(), + flags: wgpu::InstanceFlags::default(), dx12_shader_compiler: wgpu::Dx12Compiler::Fxc, gles_minor_version: wgpu::Gles3MinorVersion::Automatic, }); From e9ec5b48b43615d60f0d0397a9fa2443f864ae34 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 1 Nov 2023 12:00:03 +0100 Subject: [PATCH 04/15] cargo deny updates --- deny.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index 1930e2e629b3..58da304840e1 100644 --- a/deny.toml +++ b/deny.toml @@ -48,12 +48,16 @@ deny = [ skip = [ { name = "ahash" }, # Popular crate + fast release schedule = lots of crates still using old versions { name = "base64" }, # Too popular - { name = "foreign-types" }, # used for cocoa bindings. wgpu uses newer than winit. + { name = "foreign-types" }, # used for cocoa bindings. wgpu uses newer than eframe. { name = "foreign-types-shared" }, # as above. { name = "memoffset" }, # Small crate { name = "nix" }, # difficult to avoid :( { name = "prettyplease" }, # Old version being used by prost { name = "time" }, # Too popular + { name = "hashbrown" }, # Old version used by polar-rs + { name = "spin" }, # Old version used by rusttls + { name = "libloading" }, # Old version used by ash (vulkan binding), newer version used by khronos-egl + { name = "windows" }, # Old version used by accesskit_windows, newer version used by wgpu ] skip-tree = [ { name = "cargo-run-wasm" }, # Dev-tool From 645840a6d0b333705fd1a00308a79436f305b295 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 16 Nov 2023 10:47:05 +0100 Subject: [PATCH 05/15] Update to latest egui master --- Cargo.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bc5b8fec2518..702dd455c258 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -230,9 +230,9 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -eframe = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -egui = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -emath = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } -epaint = { git = "https://github.com/emilk/egui.git", commit = "b9500460b91dae60d44a8e615bcad5671845cf01" } +ecolor = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +eframe = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +emath = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +epaint = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 From 969eeaf8060bb9d7820e497de7c828c8aa27b71a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 16 Nov 2023 10:56:33 +0100 Subject: [PATCH 06/15] Actually update to latest egui master --- Cargo.lock | 378 ++++++++++++++++++++++-------- Cargo.toml | 13 +- crates/re_time_panel/src/lib.rs | 4 +- crates/re_ui/src/design_tokens.rs | 6 +- 4 files changed, 286 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7be1526543c9..81b8641c9cf3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c98a5d094590335462354da402d754fe2cb78f0e6ce5024611c28ed539c1de" +checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2" dependencies = [ "enumn", "serde", @@ -30,18 +30,18 @@ dependencies = [ [[package]] name = "accesskit_consumer" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca541e0fdb600916d196a940228df99b86d804fd2e6ef13894d7814f2799db43" +checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.7.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4baea9413f0daf1cd4aab199bc09f8139cd726ce7673d523c27d186b8b878325" +checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" dependencies = [ "accesskit", "accesskit_consumer", @@ -51,38 +51,40 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d1517421278cc8e67422d0786a18cf4291093ebe49eadf1cf989ff80e57f90" +checksum = "6c8c9b4467d77cacfbc93cee9aa8e7822f6d527c774efdca5f8b3a5280c34847" dependencies = [ "accesskit", "accesskit_consumer", "async-channel", + "async-once-cell", "atspi", - "futures-lite", + "futures-lite 1.13.0", + "once_cell", "serde", "zbus", ] [[package]] name = "accesskit_windows" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11c7f177739f23bd19bb856e4a64fdd96eb8638ec0a6a6dde9a7019a9e91c53" +checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" dependencies = [ "accesskit", "accesskit_consumer", - "arrayvec", "once_cell", "paste", - "windows 0.44.0", + "static_assertions", + "windows 0.48.0", ] [[package]] name = "accesskit_winit" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f1bd64cd0b480cafb7bdd91eb489a1ff50f0f5702437b9efa32a25b8bb82a1" +checksum = "88e39fcec2e10971e188730b7a76bab60647dacc973d4591855ebebcadfaa738" dependencies = [ "accesskit", "accesskit_macos", @@ -355,18 +357,18 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -376,11 +378,11 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ - "async-lock", + "async-lock 2.7.0", "async-task", "concurrent-queue", "fastrand", - "futures-lite", + "futures-lite 1.13.0", "slab", ] @@ -390,10 +392,10 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ - "async-lock", + "async-lock 2.7.0", "autocfg", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] @@ -404,10 +406,10 @@ checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" dependencies = [ "async-channel", "async-executor", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.7.0", "blocking", - "futures-lite", + "futures-lite 1.13.0", "once_cell", ] @@ -417,27 +419,81 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.7.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix", + "polling 2.8.0", + "rustix 0.37.19", "slab", "socket2", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +dependencies = [ + "async-lock 3.1.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.0", + "rustix 0.38.24", + "slab", + "tracing", + "waker-fn", + "windows-sys 0.48.0", +] + [[package]] name = "async-lock" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7" +dependencies = [ + "event-listener 3.1.0", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-once-cell" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.7.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.24", + "windows-sys 0.48.0", ] [[package]] @@ -451,6 +507,24 @@ dependencies = [ "syn 2.0.32", ] +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.0", + "async-lock 2.7.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.24", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + [[package]] name = "async-std" version = "1.12.0" @@ -459,13 +533,13 @@ checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-channel", "async-global-executor", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.7.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", @@ -502,29 +576,50 @@ checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atspi" -version = "0.10.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" +checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" dependencies = [ - "async-recursion", - "async-trait", - "atspi-macros", "enumflags2", - "futures-lite", "serde", - "tracing", + "static_assertions", "zbus", "zbus_names", + "zvariant", ] [[package]] -name = "atspi-macros" -version = "0.2.0" +name = "atspi-connection" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" dependencies = [ - "quote", - "syn 1.0.109", + "atspi-common", + "atspi-proxies", + "futures-lite 1.13.0", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" +dependencies = [ + "atspi-common", + "serde", + "zbus", ] [[package]] @@ -602,9 +697,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "block" @@ -647,11 +742,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" dependencies = [ "async-channel", - "async-lock", + "async-lock 2.7.0", "async-task", "atomic-waker", "fastrand", - "futures-lite", + "futures-lite 1.13.0", "log", ] @@ -1284,7 +1379,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.1", "libloading 0.8.1", "winapi", ] @@ -1419,7 +1514,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "serde", @@ -1428,7 +1523,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "cocoa", @@ -1461,7 +1556,7 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "accesskit", "ahash 0.8.6", @@ -1477,7 +1572,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "epaint", @@ -1492,7 +1587,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "accesskit_winit", "arboard", @@ -1521,15 +1616,14 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ffe3fe5c00295f91c2a61a74ee271c32f74049c94ba0b1cea8f26eb478bc07" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "egui", "ehttp", "enum-map", "image", "log", - "mime_guess", + "mime_guess2", "puffin", "serde", ] @@ -1537,7 +1631,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "egui", @@ -1597,7 +1691,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "serde", @@ -1699,7 +1793,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#b9500460b91dae60d44a8e615bcad5671845cf01" +source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "ab_glyph", "ahash 0.8.6", @@ -1761,6 +1855,27 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +dependencies = [ + "event-listener 3.1.0", + "pin-project-lite", +] + [[package]] name = "ewebsock" version = "0.4.0" @@ -2003,6 +2118,16 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.28" @@ -2199,7 +2324,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.1", "gpu-alloc-types", ] @@ -2209,7 +2334,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.1", ] [[package]] @@ -2592,7 +2717,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", + "rustix 0.37.19", "windows-sys 0.48.0", ] @@ -2790,9 +2915,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.144" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -2842,6 +2967,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + [[package]] name = "litrs" version = "0.2.3" @@ -2995,7 +3126,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.1", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -3029,6 +3160,16 @@ dependencies = [ "unicase", ] +[[package]] +name = "mime_guess2" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a3333bb1609500601edc766a39b4c1772874a4ce26022f4d866854dc020c41" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal" version = "0.11.0-alpha.1+dev" @@ -3126,7 +3267,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61d829abac9f5230a85d8cc83ec0879b4c09790208ae25b5ea031ef84562e071" dependencies = [ "bit-set", - "bitflags 2.3.1", + "bitflags 2.4.1", "codespan-reporting", "hexf-parse", "indexmap 2.1.0", @@ -3609,9 +3750,9 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3794,6 +3935,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.24", + "tracing", + "windows-sys 0.48.0", +] + [[package]] name = "pollster" version = "0.3.0" @@ -3971,7 +4126,7 @@ dependencies = [ "indoc", "libc", "memoffset 0.9.0", - "parking_lot 0.12.1", + "parking_lot 0.11.2", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -5163,7 +5318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" dependencies = [ "ashpd", - "async-io", + "async-io 1.13.0", "block", "dispatch", "futures-util", @@ -5443,7 +5598,20 @@ dependencies = [ "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -5923,7 +6091,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.19", "windows-sys 0.45.0", ] @@ -6809,7 +6977,7 @@ dependencies = [ "js-sys", "log", "naga", - "parking_lot 0.12.1", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "smallvec", @@ -6830,11 +6998,11 @@ checksum = "837e02ddcdc6d4a9b56ba4598f7fd4202a7699ab03f6ef4dcdebfad2c966aea6" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.3.1", + "bitflags 2.4.1", "codespan-reporting", "log", "naga", - "parking_lot 0.12.1", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "rustc-hash", @@ -6855,7 +7023,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.3.1", + "bitflags 2.4.1", "block", "core-graphics-types", "d3d12", @@ -6874,7 +7042,7 @@ dependencies = [ "naga", "objc", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.11.2", "profiling", "range-alloc", "raw-window-handle", @@ -6894,7 +7062,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d5ed5f0edf0de351fe311c53304986315ce866f394a2e6df0c4b3c70774bcdd" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.1", "js-sys", "web-sys", ] @@ -6958,13 +7126,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ "windows-implement", "windows-interface", - "windows-targets 0.42.2", + "windows-targets 0.48.5", ] [[package]] @@ -6988,9 +7156,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" dependencies = [ "proc-macro2", "quote", @@ -6999,9 +7167,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" dependencies = [ "proc-macro2", "quote", @@ -7274,22 +7442,24 @@ dependencies = [ [[package]] name = "zbus" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29242fa5ec5693629ae74d6eb1f69622a9511f600986d6d9779bccf36ac316e3" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.7.0", + "async-process", "async-recursion", "async-task", "async-trait", + "blocking", "byteorder", "derivative", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", @@ -7313,9 +7483,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537793e26e9af85f774801dc52c6f6292352b2b517c5cf0449ffd3735732a53a" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7327,9 +7497,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82441e6033be0a741157a72951a3e4957d519698f3a824439cc131c5ba77ac2a" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" dependencies = [ "serde", "static_assertions", @@ -7374,7 +7544,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29ca36c2e02af0d8d7ee977542bfe33ed1c516be73d3c1faa4420af46e96ceee" dependencies = [ - "bitflags 2.3.1", + "bitflags 2.4.1", ] [[package]] @@ -7389,9 +7559,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.13.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb36cd95352132911c9c99fdcc1635de5c2c139bd34cbcf6dfb8350ee8ff6a7" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" dependencies = [ "byteorder", "enumflags2", @@ -7404,9 +7574,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.13.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34951e1ac64f3a1443fe7181256b9ed6a811a1631917566c3d5ca718d8cf33" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7417,9 +7587,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b22993dbc4d128a17a3b6c92f1c63872dd67198537ee728d8b5d7c40640a8b" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b21686f10920..b4a7c2cc6b48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,9 +232,10 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -eframe = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -emath = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -epaint = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +ecolor = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +eframe = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui_extras = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +emath = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +epaint = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 diff --git a/crates/re_time_panel/src/lib.rs b/crates/re_time_panel/src/lib.rs index 74caae5c9753..e1f98f5ac671 100644 --- a/crates/re_time_panel/src/lib.rs +++ b/crates/re_time_panel/src/lib.rs @@ -138,7 +138,7 @@ impl TimePanel { ui.visuals().widgets.noninteractive.bg_stroke, ); - ui.spacing_mut().scroll_bar_outer_margin = 4.0; // needed, because we have no panel margin on the right side. + ui.spacing_mut().scroll.bar_outer_margin = 4.0; // needed, because we have no panel margin on the right side. // Add extra margin on the left which was intentionally missing on the controls. let mut streams_frame = egui::Frame::default(); @@ -218,7 +218,7 @@ impl TimePanel { let time_bg_x_range = Rangef::new(time_x_left, ui.max_rect().right()); let time_fg_x_range = { // Painting to the right of the scroll bar (if any) looks bad: - let right = ui.max_rect().right() - ui.spacing_mut().scroll_bar_outer_margin; + let right = ui.max_rect().right() - ui.spacing_mut().scroll.bar_outer_margin; debug_assert!(time_x_left < right); Rangef::new(time_x_left, right) }; diff --git a/crates/re_ui/src/design_tokens.rs b/crates/re_ui/src/design_tokens.rs index 7524f243c1b7..604f85f9866a 100644 --- a/crates/re_ui/src/design_tokens.rs +++ b/crates/re_ui/src/design_tokens.rs @@ -179,9 +179,9 @@ fn apply_design_tokens(ctx: &egui::Context) -> DesignTokens { egui_style.spacing.combo_width = 8.0; // minimum width of ComboBox - keep them small, with the down-arrow close. - egui_style.spacing.scroll_bar_inner_margin = 2.0; - egui_style.spacing.scroll_bar_width = 6.0; - egui_style.spacing.scroll_bar_outer_margin = 2.0; + egui_style.spacing.scroll.bar_inner_margin = 2.0; + egui_style.spacing.scroll.bar_width = 6.0; + egui_style.spacing.scroll.bar_outer_margin = 2.0; // don't color hyperlinks #2733 egui_style.visuals.hyperlink_color = default; From 3a652e1bc3be32ee9f12957615a6331808bee00d Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 17 Nov 2023 11:15:34 +0100 Subject: [PATCH 07/15] Fix: use `rev` instead of `commit` --- Cargo.lock | 18 +++++++++--------- Cargo.toml | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 81b8641c9cf3..e82799e95a89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,7 +1514,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "serde", @@ -1523,7 +1523,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "cocoa", @@ -1556,7 +1556,7 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "accesskit", "ahash 0.8.6", @@ -1572,7 +1572,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "epaint", @@ -1587,7 +1587,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "accesskit_winit", "arboard", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "egui", "ehttp", @@ -1631,7 +1631,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "egui", @@ -1691,7 +1691,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "bytemuck", "serde", @@ -1793,7 +1793,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" dependencies = [ "ab_glyph", "ahash 0.8.6", diff --git a/Cargo.toml b/Cargo.toml index b4a7c2cc6b48..801617d12ef5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,10 +232,10 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -eframe = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui_extras = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui-wgpu = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -emath = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -epaint = { git = "https://github.com/emilk/egui.git", commit = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +ecolor = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +eframe = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +emath = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +epaint = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 From f829d38ed54cea753ec711f9ab0447b9b5167ecb Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 18 Nov 2023 19:32:37 +0100 Subject: [PATCH 08/15] Update to latest egui master --- Cargo.lock | 27 +++++++------- Cargo.toml | 14 +++---- crates/re_ui/Cargo.toml | 8 +--- crates/re_ui/examples/re_ui_example.rs | 36 +++++++----------- crates/re_ui/src/lib.rs | 17 +++++---- crates/re_viewer/Cargo.toml | 2 +- crates/re_viewer/src/app.rs | 51 +++++++++++++------------- crates/re_viewer/src/screenshotter.rs | 8 +--- crates/re_viewer/src/ui/rerun_menu.rs | 18 +++++---- crates/re_viewer/src/ui/top_panel.rs | 34 +++++------------ 10 files changed, 91 insertions(+), 124 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e82799e95a89..ebe5db87a7ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,7 +1514,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "bytemuck", "serde", @@ -1523,7 +1523,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "bytemuck", "cocoa", @@ -1556,7 +1556,7 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "accesskit", "ahash 0.8.6", @@ -1572,9 +1572,10 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "bytemuck", + "egui", "epaint", "log", "puffin", @@ -1587,7 +1588,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "accesskit_winit", "arboard", @@ -1616,7 +1617,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "egui", "ehttp", @@ -1631,7 +1632,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "bytemuck", "egui", @@ -1691,7 +1692,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "bytemuck", "serde", @@ -1793,7 +1794,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=fb8fa67afd6e673f76e7b56221a2162981d62f79#fb8fa67afd6e673f76e7b56221a2162981d62f79" +source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" dependencies = [ "ab_glyph", "ahash 0.8.6", @@ -4126,7 +4127,7 @@ dependencies = [ "indoc", "libc", "memoffset 0.9.0", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -6977,7 +6978,7 @@ dependencies = [ "js-sys", "log", "naga", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "profiling", "raw-window-handle", "smallvec", @@ -7002,7 +7003,7 @@ dependencies = [ "codespan-reporting", "log", "naga", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "profiling", "raw-window-handle", "rustc-hash", @@ -7042,7 +7043,7 @@ dependencies = [ "naga", "objc", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "profiling", "range-alloc", "raw-window-handle", diff --git a/Cargo.toml b/Cargo.toml index 801617d12ef5..2a6cced2ee85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,10 +232,10 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -eframe = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -emath = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 -epaint = { git = "https://github.com/emilk/egui.git", rev = "fb8fa67afd6e673f76e7b56221a2162981d62f79" } # egui master 2023-11-16 +ecolor = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +eframe = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +egui = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +emath = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +epaint = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 diff --git a/crates/re_ui/Cargo.toml b/crates/re_ui/Cargo.toml index 1de8e075d024..93445132cb52 100644 --- a/crates/re_ui/Cargo.toml +++ b/crates/re_ui/Cargo.toml @@ -23,10 +23,7 @@ all-features = true [features] -default = ["eframe"] - -eframe = ["dep:eframe"] - +default = [] [dependencies] egui_extras.workspace = true @@ -37,9 +34,6 @@ strum.workspace = true strum_macros.workspace = true sublime_fuzzy.workspace = true -## Optional dependencies: -eframe = { workspace = true, optional = true, default-features = false } - [dev-dependencies] eframe = { workspace = true, default-features = false, features = ["wgpu"] } egui_tiles.workspace = true diff --git a/crates/re_ui/examples/re_ui_example.rs b/crates/re_ui/examples/re_ui_example.rs index d68b6f219535..0b18b541c7fc 100644 --- a/crates/re_ui/examples/re_ui_example.rs +++ b/crates/re_ui/examples/re_ui_example.rs @@ -147,16 +147,13 @@ impl eframe::App for ExampleApp { [0.0; 4] // transparent so we can get rounded corners when doing [`re_ui::CUSTOM_WINDOW_DECORATIONS`] } - fn update(&mut self, egui_ctx: &egui::Context, frame: &mut eframe::Frame) { + fn update(&mut self, egui_ctx: &egui::Context, _frame: &mut eframe::Frame) { self.show_text_logs_as_notifications(); self.toasts.show(egui_ctx); - egui::gui_zoom::zoom_with_keyboard_shortcuts( - egui_ctx, - frame.info().native_pixels_per_point, - ); + egui::gui_zoom::zoom_with_keyboard_shortcuts(egui_ctx); - self.top_bar(egui_ctx, frame); + self.top_bar(egui_ctx); egui::TopBottomPanel::bottom("bottom_panel") .frame(self.re_ui.bottom_panel_frame()) @@ -364,18 +361,9 @@ impl eframe::App for ExampleApp { } impl ExampleApp { - fn top_bar(&mut self, egui_ctx: &egui::Context, frame: &mut eframe::Frame) { - let native_pixels_per_point = frame.info().native_pixels_per_point; - let fullscreen = { - #[cfg(target_arch = "wasm32")] - { - false - } - #[cfg(not(target_arch = "wasm32"))] - { - frame.info().window_info.fullscreen - } - }; + fn top_bar(&mut self, egui_ctx: &egui::Context) { + let native_pixels_per_point = egui_ctx.input(|i| i.raw.native_pixels_per_point); + let fullscreen = egui_ctx.input(|i| i.viewport().fullscreen).unwrap_or(false); let top_bar_style = self .re_ui .top_bar_style(native_pixels_per_point, fullscreen, false); @@ -390,7 +378,7 @@ impl ExampleApp { ui.menu_button("File", |ui| file_menu(ui, &self.command_sender)); - self.top_bar_ui(ui, frame); + self.top_bar_ui(ui); }) .response; @@ -398,21 +386,23 @@ impl ExampleApp { if !re_ui::NATIVE_WINDOW_BAR { let title_bar_response = _response.interact(egui::Sense::click()); if title_bar_response.double_clicked() { - frame.set_maximized(!frame.info().window_info.maximized); + let maximized = ui.input(|i| i.viewport().maximized.unwrap_or(false)); + ui.ctx() + .send_viewport_cmd(egui::ViewportCommand::Maximized(!maximized)); } else if title_bar_response.is_pointer_button_down_on() { - frame.drag_window(); + ui.ctx().send_viewport_cmd(egui::ViewportCommand::StartDrag); } } }); } - fn top_bar_ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) { + fn top_bar_ui(&mut self, ui: &mut egui::Ui) { ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { // From right-to-left: if re_ui::CUSTOM_WINDOW_DECORATIONS { ui.add_space(8.0); - re_ui::native_window_buttons_ui(frame, ui); + re_ui::native_window_buttons_ui(ui); ui.separator(); } else { ui.add_space(16.0); diff --git a/crates/re_ui/src/lib.rs b/crates/re_ui/src/lib.rs index 86271c055c67..7572261e3834 100644 --- a/crates/re_ui/src/lib.rs +++ b/crates/re_ui/src/lib.rs @@ -917,10 +917,9 @@ impl ReUi { /// Assumes it is in a right-to-left layout. /// /// Use when [`CUSTOM_WINDOW_DECORATIONS`] is set. -#[cfg(feature = "eframe")] #[cfg(not(target_arch = "wasm32"))] -pub fn native_window_buttons_ui(frame: &mut eframe::Frame, ui: &mut egui::Ui) { - use egui::{Button, RichText}; +pub fn native_window_buttons_ui(ui: &mut egui::Ui) { + use egui::{Button, RichText, ViewportCommand}; let button_height = 12.0; @@ -928,22 +927,24 @@ pub fn native_window_buttons_ui(frame: &mut eframe::Frame, ui: &mut egui::Ui) { .add(Button::new(RichText::new("❌").size(button_height))) .on_hover_text("Close the window"); if close_response.clicked() { - frame.close(); + ui.ctx().send_viewport_cmd(ViewportCommand::Close); } - if frame.info().window_info.maximized { + let maximized = ui.input(|i| i.viewport().maximized.unwrap_or(false)); + if maximized { let maximized_response = ui .add(Button::new(RichText::new("🗗").size(button_height))) .on_hover_text("Restore window"); if maximized_response.clicked() { - frame.set_maximized(false); + ui.ctx() + .send_viewport_cmd(ViewportCommand::Maximized(false)); } } else { let maximized_response = ui .add(Button::new(RichText::new("🗗").size(button_height))) .on_hover_text("Maximize window"); if maximized_response.clicked() { - frame.set_maximized(true); + ui.ctx().send_viewport_cmd(ViewportCommand::Maximized(true)); } } @@ -951,7 +952,7 @@ pub fn native_window_buttons_ui(frame: &mut eframe::Frame, ui: &mut egui::Ui) { .add(Button::new(RichText::new("🗕").size(button_height))) .on_hover_text("Minimize the window"); if minimized_response.clicked() { - frame.set_minimized(true); + ui.ctx().send_viewport_cmd(ViewportCommand::Minimized(true)); } } diff --git a/crates/re_viewer/Cargo.toml b/crates/re_viewer/Cargo.toml index 03ac037eb107..496d0a441c2d 100644 --- a/crates/re_viewer/Cargo.toml +++ b/crates/re_viewer/Cargo.toml @@ -61,7 +61,7 @@ re_time_panel.workspace = true re_tracing = { workspace = true, features = ["server"] } re_types_core.workspace = true re_types.workspace = true -re_ui = { workspace = true, features = ["eframe"] } +re_ui.workspace = true re_viewer_context.workspace = true re_viewport.workspace = true re_ws_comms = { workspace = true, features = ["client"] } diff --git a/crates/re_viewer/src/app.rs b/crates/re_viewer/src/app.rs index bc23bef590a3..b943c0a2263e 100644 --- a/crates/re_viewer/src/app.rs +++ b/crates/re_viewer/src/app.rs @@ -302,13 +302,12 @@ impl App { fn run_pending_ui_commands( &mut self, - frame: &mut eframe::Frame, egui_ctx: &egui::Context, app_blueprint: &AppBlueprint<'_>, store_context: Option<&StoreContext<'_>>, ) { while let Some(cmd) = self.command_receiver.recv_ui() { - self.run_ui_command(frame, egui_ctx, app_blueprint, store_context, cmd); + self.run_ui_command(egui_ctx, app_blueprint, store_context, cmd); } } @@ -372,7 +371,6 @@ impl App { fn run_ui_command( &mut self, - _frame: &mut eframe::Frame, _egui_ctx: &egui::Context, app_blueprint: &AppBlueprint<'_>, store_context: Option<&StoreContext<'_>>, @@ -419,9 +417,10 @@ impl App { .send_system(SystemCommand::CloseRecordingId(cur_rec.clone())); } } + #[cfg(not(target_arch = "wasm32"))] UICommand::Quit => { - _frame.close(); + _egui_ctx.send_viewport_cmd(egui::ViewportCommand::Close); } UICommand::ResetViewer => self.command_sender.send_system(SystemCommand::ResetViewer), @@ -449,7 +448,8 @@ impl App { #[cfg(not(target_arch = "wasm32"))] UICommand::ToggleFullscreen => { - _frame.set_fullscreen(!_frame.info().window_info.fullscreen); + let fullscreen = _egui_ctx.input(|i| i.viewport().fullscreen.unwrap_or(false)); + _egui_ctx.send_viewport_cmd(egui::ViewportCommand::Fullscreen(!fullscreen)); } #[cfg(not(target_arch = "wasm32"))] UICommand::ZoomIn => { @@ -661,14 +661,7 @@ impl App { crate::ui::mobile_warning_ui(&self.re_ui, ui); - crate::ui::top_panel( - app_blueprint, - store_context, - ui, - frame, - self, - gpu_resource_stats, - ); + crate::ui::top_panel(app_blueprint, store_context, ui, self, gpu_resource_stats); self.memory_panel_ui(ui, gpu_resource_stats, store_stats); @@ -1017,12 +1010,14 @@ impl eframe::App for App { #[cfg(not(target_arch = "wasm32"))] if let Some(resolution_in_points) = self.startup_options.resolution_in_points.take() { - frame.set_window_size(resolution_in_points.into()); + egui_ctx.send_viewport_cmd(egui::ViewportCommand::InnerSize( + resolution_in_points.into(), + )); } #[cfg(not(target_arch = "wasm32"))] - if self.screenshotter.update(egui_ctx, frame).quit { - frame.close(); + if self.screenshotter.update(egui_ctx).quit { + egui_ctx.send_viewport_cmd(egui::ViewportCommand::Close); return; } @@ -1059,8 +1054,10 @@ impl eframe::App for App { } // Apply zoom factor on top of natively reported pixel per point. - let pixels_per_point = frame.info().native_pixels_per_point.unwrap_or(1.0) - * self.app_options().zoom_factor; + let native_pixels_per_point = egui_ctx + .input(|i| i.raw.native_pixels_per_point) + .unwrap_or(1.0); + let pixels_per_point = native_pixels_per_point * self.app_options().zoom_factor; egui_ctx.set_pixels_per_point(pixels_per_point); } @@ -1133,25 +1130,27 @@ impl eframe::App for App { self.handle_dropping_files(egui_ctx); // Run pending commands last (so we don't have to wait for a repaint before they are run): - self.run_pending_ui_commands(frame, egui_ctx, &app_blueprint, store_context.as_ref()); + self.run_pending_ui_commands(egui_ctx, &app_blueprint, store_context.as_ref()); self.run_pending_system_commands(&mut store_hub, egui_ctx); // Return the `StoreHub` to the Viewer so we have it on the next frame self.store_hub = Some(store_hub); + // Check for returned screenshot: + egui_ctx.input(|i| { + for event in &i.raw.events { + if let egui::Event::Screenshot { image, .. } = event { + self.screenshotter.save(image); + } + } + }); + // Frame time measurer - must be last self.frame_time_history.add( egui_ctx.input(|i| i.time), frame_start.elapsed().as_secs_f32(), ); } - - #[cfg(not(target_arch = "wasm32"))] - fn post_rendering(&mut self, _window_size: [u32; 2], frame: &eframe::Frame) { - if let Some(screenshot) = frame.screenshot() { - self.screenshotter.save(&screenshot); - } - } } /// Add built-in space views to the registry. diff --git a/crates/re_viewer/src/screenshotter.rs b/crates/re_viewer/src/screenshotter.rs index 1d2728b8d070..810b9f326de5 100644 --- a/crates/re_viewer/src/screenshotter.rs +++ b/crates/re_viewer/src/screenshotter.rs @@ -34,14 +34,10 @@ impl Screenshotter { } /// Call once per frame - pub fn update( - &mut self, - egui_ctx: &egui::Context, - frame: &mut eframe::Frame, - ) -> ScreenshotterOutput { + pub fn update(&mut self, egui_ctx: &egui::Context) -> ScreenshotterOutput { if let Some(countdown) = &mut self.countdown { if *countdown == 0 { - frame.request_screenshot(); + egui_ctx.send_viewport_cmd(egui::ViewportCommand::Screenshot); } else { *countdown -= 1; } diff --git a/crates/re_viewer/src/ui/rerun_menu.rs b/crates/re_viewer/src/ui/rerun_menu.rs index 10143522ebd0..e4b9eb5fee5f 100644 --- a/crates/re_viewer/src/ui/rerun_menu.rs +++ b/crates/re_viewer/src/ui/rerun_menu.rs @@ -13,7 +13,6 @@ impl App { &mut self, _store_context: Option<&StoreContext<'_>>, ui: &mut egui::Ui, - frame: &mut eframe::Frame, ) { // let desired_icon_height = ui.max_rect().height() - 2.0 * ui.spacing_mut().button_padding.y; let desired_icon_height = ui.max_rect().height() - 4.0; // TODO(emilk): figure out this fudge @@ -76,7 +75,7 @@ impl App { ui.add_space(spacing); ui.menu_button("Options", |ui| { - self.options_menu_ui(ui, frame); + self.options_menu_ui(ui); }); ui.add_space(spacing); @@ -152,7 +151,7 @@ impl App { ui.label(label); } - fn options_menu_ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + fn options_menu_ui(&mut self, ui: &mut egui::Ui) { ui.style_mut().wrap = Some(false); if self @@ -215,7 +214,7 @@ impl App { self.egui_debug_options_ui(ui); ui.separator(); - self.debug_menu_options_ui(ui, _frame); + self.debug_menu_options_ui(ui); } } @@ -316,13 +315,16 @@ impl App { } #[cfg(debug_assertions)] - fn debug_menu_options_ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + fn debug_menu_options_ui(&mut self, ui: &mut egui::Ui) { #[cfg(not(target_arch = "wasm32"))] { if ui.button("Mobile size").clicked() { - // frame.set_window_size(egui::vec2(375.0, 812.0)); // iPhone 12 mini - _frame.set_window_size(egui::vec2(375.0, 667.0)); // iPhone SE 2nd gen - _frame.set_fullscreen(false); + // let size = egui::vec2(375.0, 812.0); // iPhone 12 mini + let size = egui::vec2(375.0, 667.0); // iPhone SE 2nd gen + ui.ctx() + .send_viewport_cmd(egui::ViewportCommand::Fullscreen(false)); + ui.ctx() + .send_viewport_cmd(egui::ViewportCommand::InnerSize(size)); ui.close_menu(); } ui.separator(); diff --git a/crates/re_viewer/src/ui/top_panel.rs b/crates/re_viewer/src/ui/top_panel.rs index bdf7e6a2f279..f74785a8628a 100644 --- a/crates/re_viewer/src/ui/top_panel.rs +++ b/crates/re_viewer/src/ui/top_panel.rs @@ -10,23 +10,13 @@ pub fn top_panel( app_blueprint: &AppBlueprint<'_>, store_context: Option<&StoreContext<'_>>, ui: &mut egui::Ui, - frame: &mut eframe::Frame, app: &mut App, gpu_resource_stats: &WgpuResourcePoolStatistics, ) { re_tracing::profile_function!(); - let native_pixels_per_point = frame.info().native_pixels_per_point; - let fullscreen = { - #[cfg(target_arch = "wasm32")] - { - false - } - #[cfg(not(target_arch = "wasm32"))] - { - frame.info().window_info.fullscreen - } - }; + let native_pixels_per_point = ui.input(|i| i.raw.native_pixels_per_point); + let fullscreen = ui.input(|i| i.viewport().fullscreen).unwrap_or(false); let style_like_web = app.is_screenshotting(); let top_bar_style = app.re_ui() @@ -40,14 +30,7 @@ pub fn top_panel( ui.set_height(top_bar_style.height); ui.add_space(top_bar_style.indent); - top_bar_ui( - app_blueprint, - store_context, - ui, - frame, - app, - gpu_resource_stats, - ); + top_bar_ui(app_blueprint, store_context, ui, app, gpu_resource_stats); }) .response; @@ -55,9 +38,11 @@ pub fn top_panel( if !re_ui::NATIVE_WINDOW_BAR { let title_bar_response = _response.interact(egui::Sense::click()); if title_bar_response.double_clicked() { - frame.set_maximized(!frame.info().window_info.maximized); + let maximized = ui.input(|i| i.viewport().maximized.unwrap_or(false)); + ui.ctx() + .send_viewport_cmd(egui::ViewportCommand::Maximized(!maximized)); } else if title_bar_response.is_pointer_button_down_on() { - frame.drag_window(); + ui.ctx().send_viewport_cmd(egui::ViewportCommand::StartDrag); } } }); @@ -67,11 +52,10 @@ fn top_bar_ui( app_blueprint: &AppBlueprint<'_>, store_context: Option<&StoreContext<'_>>, ui: &mut egui::Ui, - frame: &mut eframe::Frame, app: &mut App, gpu_resource_stats: &WgpuResourcePoolStatistics, ) { - app.rerun_menu_button_ui(store_context, ui, frame); + app.rerun_menu_button_ui(store_context, ui); ui.add_space(12.0); website_link_ui(ui); @@ -87,7 +71,7 @@ fn top_bar_ui( if re_ui::CUSTOM_WINDOW_DECORATIONS && !cfg!(target_arch = "wasm32") { ui.add_space(8.0); #[cfg(not(target_arch = "wasm32"))] - re_ui::native_window_buttons_ui(frame, ui); + re_ui::native_window_buttons_ui(ui); ui.separator(); } else { // Make the first button the same distance form the side as from the top, From d9e4ebe80470da57a9eee7cb2f34a58d92ec5961 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 19 Nov 2023 11:26:03 +0100 Subject: [PATCH 09/15] Update to latest egui master --- Cargo.lock | 18 ++++++------- Cargo.toml | 14 +++++----- crates/re_ui/examples/re_ui_example.rs | 16 +++++------ crates/re_viewer/src/native.rs | 31 +++++++++------------- examples/rust/extend_viewer_ui/src/main.rs | 2 +- 5 files changed, 35 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ebe5db87a7ac..80f638206ed5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,7 +1514,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "bytemuck", "serde", @@ -1523,7 +1523,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "bytemuck", "cocoa", @@ -1556,7 +1556,7 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "accesskit", "ahash 0.8.6", @@ -1572,7 +1572,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "bytemuck", "egui", @@ -1588,7 +1588,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "accesskit_winit", "arboard", @@ -1617,7 +1617,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "egui", "ehttp", @@ -1632,7 +1632,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "bytemuck", "egui", @@ -1692,7 +1692,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "bytemuck", "serde", @@ -1794,7 +1794,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=1571027556b57cef5908df094038795c09b9090a#1571027556b57cef5908df094038795c09b9090a" +source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" dependencies = [ "ab_glyph", "ahash 0.8.6", diff --git a/Cargo.toml b/Cargo.toml index 2a6cced2ee85..56d64ef41883 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,10 +232,10 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 -eframe = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 -egui = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 -egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 -emath = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 -epaint = { git = "https://github.com/emilk/egui.git", rev = "1571027556b57cef5908df094038795c09b9090a" } # egui master 2023-11-18 +ecolor = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +eframe = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +egui = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +emath = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +epaint = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 diff --git a/crates/re_ui/examples/re_ui_example.rs b/crates/re_ui/examples/re_ui_example.rs index 0b18b541c7fc..e4aeeab3ebb2 100644 --- a/crates/re_ui/examples/re_ui_example.rs +++ b/crates/re_ui/examples/re_ui_example.rs @@ -33,20 +33,16 @@ fn main() -> eframe::Result<()> { re_log::setup_native_logging(); let native_options = eframe::NativeOptions { - app_id: Some("rerun_example_re_ui_example".to_owned()), + viewport: egui::ViewportBuilder::default() + .with_app_id("re_ui_example") + .with_decorations(!re_ui::CUSTOM_WINDOW_DECORATIONS) // Maybe hide the OS-specific "chrome" around the window + .with_fullsize_content_view(re_ui::FULLSIZE_CONTENT) + .with_inner_size([1200.0, 800.0]) + .with_transparent(re_ui::CUSTOM_WINDOW_DECORATIONS), // To have rounded corners we need transparency - initial_window_size: Some([1200.0, 800.0].into()), follow_system_theme: false, default_theme: eframe::Theme::Dark, - #[cfg(target_os = "macos")] - fullsize_content: re_ui::FULLSIZE_CONTENT, - - // Maybe hide the OS-specific "chrome" around the window: - decorated: !re_ui::CUSTOM_WINDOW_DECORATIONS, - // To have rounded corners we need transparency: - transparent: re_ui::CUSTOM_WINDOW_DECORATIONS, - ..Default::default() }; diff --git a/crates/re_viewer/src/native.rs b/crates/re_viewer/src/native.rs index b6a4408319fc..ea62338bc55a 100644 --- a/crates/re_viewer/src/native.rs +++ b/crates/re_viewer/src/native.rs @@ -80,21 +80,14 @@ fn check_graphics_driver(wgpu_render_state: Option<&egui_wgpu::RenderState>) { pub fn eframe_options() -> eframe::NativeOptions { re_tracing::profile_function!(); eframe::NativeOptions { - // Controls where on disk the app state is persisted. - app_id: Some(APP_ID.to_owned()), - - initial_window_size: Some([1600.0, 1200.0].into()), - min_window_size: Some([320.0, 450.0].into()), // Should be high enough to fit the rerun menu - - icon_data: icon_data(), - - #[cfg(target_os = "macos")] - fullsize_content: re_ui::FULLSIZE_CONTENT, - - // Maybe hide the OS-specific "chrome" around the window: - decorated: !re_ui::CUSTOM_WINDOW_DECORATIONS, - // To have rounded corners we need transparency: - transparent: re_ui::CUSTOM_WINDOW_DECORATIONS, + viewport: egui::ViewportBuilder::default() + .with_app_id(APP_ID) // Controls where on disk the app state is persisted + .with_decorations(!re_ui::CUSTOM_WINDOW_DECORATIONS) // Maybe hide the OS-specific "chrome" around the window + .with_fullsize_content_view(re_ui::FULLSIZE_CONTENT) + .with_inner_size([1600.0, 1200.0]) + .with_min_inner_size([320.0, 450.0]) // Should be high enough to fit the rerun menu + .with_transparent(re_ui::CUSTOM_WINDOW_DECORATIONS) // To have rounded corners we need transparency + .with_window_icon(icon_data()), follow_system_theme: false, default_theme: eframe::Theme::Dark, @@ -109,7 +102,7 @@ pub fn eframe_options() -> eframe::NativeOptions { } #[allow(clippy::unnecessary_wraps)] -fn icon_data() -> Option { +fn icon_data() -> egui::IconData { re_tracing::profile_function!(); cfg_if::cfg_if! { @@ -124,8 +117,8 @@ fn icon_data() -> Option { }; // We include the .png with `include_bytes`. If that fails, things are extremely broken. - match eframe::IconData::try_from_png_bytes(app_icon_png_bytes) { - Ok(icon_data) => Some(icon_data), + match eframe::icon_data::from_png_bytes(app_icon_png_bytes) { + Ok(icon_data) => icon_data, Err(err) => { #[cfg(debug_assertions)] panic!("Failed to load app icon: {err}"); @@ -133,7 +126,7 @@ fn icon_data() -> Option { #[cfg(not(debug_assertions))] { re_log::warn!("Failed to load app icon: {err}"); - None + Default::default() } } } diff --git a/examples/rust/extend_viewer_ui/src/main.rs b/examples/rust/extend_viewer_ui/src/main.rs index 4743535b6ce6..a67799d88b32 100644 --- a/examples/rust/extend_viewer_ui/src/main.rs +++ b/examples/rust/extend_viewer_ui/src/main.rs @@ -31,7 +31,7 @@ async fn main() -> Result<(), Box> { .await?; let native_options = eframe::NativeOptions { - app_id: Some("rerun_example_app_id".to_owned()), + viewport: egui::ViewportBuilder::default().with_app_id("rerun_extend_viewer_ui_example"), ..re_viewer::native::eframe_options() }; From 2e109ecf5b53fe8da4919de7204c7c0327104caa Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 19 Nov 2023 12:06:38 +0100 Subject: [PATCH 10/15] Fix web build --- crates/re_viewer/src/app.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/re_viewer/src/app.rs b/crates/re_viewer/src/app.rs index b943c0a2263e..aa449f257bfa 100644 --- a/crates/re_viewer/src/app.rs +++ b/crates/re_viewer/src/app.rs @@ -1137,6 +1137,7 @@ impl eframe::App for App { self.store_hub = Some(store_hub); // Check for returned screenshot: + #[cfg(not(target_arch = "wasm32"))] egui_ctx.input(|i| { for event in &i.raw.events { if let egui::Event::Screenshot { image, .. } = event { From ebd90872dd1534919e20ecdaad10012d0e52701c Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 19 Nov 2023 21:35:42 +0100 Subject: [PATCH 11/15] Update puffin and egui --- Cargo.lock | 37 +++++++++++++++++++++---------------- Cargo.toml | 18 +++++++++--------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 80f638206ed5..58060b2b5037 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,7 +1514,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "ecolor" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "bytemuck", "serde", @@ -1523,7 +1523,7 @@ dependencies = [ [[package]] name = "eframe" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "bytemuck", "cocoa", @@ -1556,7 +1556,7 @@ dependencies = [ [[package]] name = "egui" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "accesskit", "ahash 0.8.6", @@ -1572,7 +1572,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "bytemuck", "egui", @@ -1588,7 +1588,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "accesskit_winit", "arboard", @@ -1617,7 +1617,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "egui", "ehttp", @@ -1632,7 +1632,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "bytemuck", "egui", @@ -1692,7 +1692,7 @@ checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "emath" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "bytemuck", "serde", @@ -1794,7 +1794,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.23.0" -source = "git+https://github.com/emilk/egui.git?rev=a23b959fd4c228f6d37e7e6e33bc10c4e9edc933#a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" +source = "git+https://github.com/emilk/egui.git?rev=7bfaf4963676d02a88000b900b46365a827e0b65#7bfaf4963676d02a88000b900b46365a827e0b65" dependencies = [ "ab_glyph", "ahash 0.8.6", @@ -3030,6 +3030,12 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "lz4_flex" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" + [[package]] name = "macaw" version = "0.18.3" @@ -4079,16 +4085,15 @@ dependencies = [ [[package]] name = "puffin" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76425abd4e1a0ad4bd6995dd974b52f414fca9974171df8e3708b3e660d05a21" +checksum = "39009d69b9d547c3ffa974a20648fa02f447c05bd0a664012b1ba5a5b06fb14e" dependencies = [ "anyhow", "bincode", "byteorder", "cfg-if", - "instant", - "lz4_flex", + "lz4_flex 0.11.1", "once_cell", "parking_lot 0.12.1", "serde", @@ -4096,9 +4101,9 @@ dependencies = [ [[package]] name = "puffin_http" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bffc600c35913d282ae1e96a6ffcdf36dc7a7cdb9310e0ba15914d258c8193" +checksum = "540d042ff82a4f4543fb2e44cf0221ba8b7d6fb7b16979840449a5ddc087486f" dependencies = [ "anyhow", "crossbeam-channel", @@ -4490,7 +4495,7 @@ dependencies = [ "criterion", "ehttp", "js-sys", - "lz4_flex", + "lz4_flex 0.10.0", "mimalloc", "parking_lot 0.12.1", "re_build_info", diff --git a/Cargo.toml b/Cargo.toml index 56d64ef41883..3fd8120b58e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -156,8 +156,8 @@ polars-lazy = "0.29" polars-ops = "0.29" poll-promise = "0.3" pollster = "0.3" -puffin = "0.16" -puffin_http = "0.13" +puffin = "0.17" +puffin_http = "0.14" rand = { version = "0.8", default-features = false } rayon = "1.7" rfd = { version = "0.12", default_features = false, features = ["xdg-portal"] } @@ -232,10 +232,10 @@ debug = true # If that is not possible, patch to a branch that has a PR open on the upstream repo. # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -ecolor = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 -eframe = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 -egui = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 -egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 -emath = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 -epaint = { git = "https://github.com/emilk/egui.git", rev = "a23b959fd4c228f6d37e7e6e33bc10c4e9edc933" } # egui master 2023-11-19 +ecolor = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 +eframe = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 +egui = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 +emath = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 +epaint = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 From 8e56d819130de37f89e5268f116c392890d68422 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 19 Nov 2023 21:37:46 +0100 Subject: [PATCH 12/15] Move re_log_encoding deps to workspace Cargo.toml --- Cargo.toml | 1 + crates/re_log_encoding/Cargo.toml | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3fd8120b58e8..ff296bd8fc4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,6 +132,7 @@ infer = "0.15" # infer MIME type by checking the magic number signature itertools = "0.11" js-sys = "0.3" lazy_static = "1.4" +lz4_flex = "0.10" log = "0.4" log-once = "0.4" macaw = "0.18" diff --git a/crates/re_log_encoding/Cargo.toml b/crates/re_log_encoding/Cargo.toml index f12118f83506..35bcbe044f8b 100644 --- a/crates/re_log_encoding/Cargo.toml +++ b/crates/re_log_encoding/Cargo.toml @@ -42,20 +42,20 @@ thiserror.workspace = true web-time.workspace = true # Optional external dependencies: +lz4_flex = { workspace = true, optional = true } rmp-serde = { workspace = true, optional = true } -lz4_flex = { version = "0.10", optional = true } # Web dependencies: [target.'cfg(target_arch = "wasm32")'.dependencies] -js-sys = "0.3" -wasm-bindgen = "0.2" -wasm-bindgen-futures = "0.4" -web-sys = { version = "0.3.52", features = ["Window"] } +js-sys.workspace = true +wasm-bindgen.workspace = true +wasm-bindgen-futures.workspace = true +web-sys = { workspace = true, features = ["Window"] } [dev-dependencies] re_types = { workspace = true, features = ["datagen", "serde"] } -criterion = "0.5" +criterion.workspace = true mimalloc.workspace = true serde_test.workspace = true From fa615de5e3333a9959c5899a87c59b7bac52caed Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 19 Nov 2023 21:38:06 +0100 Subject: [PATCH 13/15] Update lz4_flex to 0.11 --- Cargo.lock | 14 ++++---------- Cargo.toml | 13 ++++++++++++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58060b2b5037..062ae93ca1e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3023,19 +3023,13 @@ dependencies = [ [[package]] name = "lz4_flex" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8c72594ac26bfd34f2d99dfced2edfaddfe8a476e3ff2ca0eb293d925c4f83" +checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" dependencies = [ "twox-hash", ] -[[package]] -name = "lz4_flex" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" - [[package]] name = "macaw" version = "0.18.3" @@ -4093,7 +4087,7 @@ dependencies = [ "bincode", "byteorder", "cfg-if", - "lz4_flex 0.11.1", + "lz4_flex", "once_cell", "parking_lot 0.12.1", "serde", @@ -4495,7 +4489,7 @@ dependencies = [ "criterion", "ehttp", "js-sys", - "lz4_flex 0.10.0", + "lz4_flex", "mimalloc", "parking_lot 0.12.1", "re_build_info", diff --git a/Cargo.toml b/Cargo.toml index ff296bd8fc4f..4aae7ccf10e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,7 +132,7 @@ infer = "0.15" # infer MIME type by checking the magic number signature itertools = "0.11" js-sys = "0.3" lazy_static = "1.4" -lz4_flex = "0.10" +lz4_flex = "0.11" log = "0.4" log-once = "0.4" macaw = "0.18" @@ -240,3 +240,14 @@ egui_extras = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d0 egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 emath = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 epaint = { git = "https://github.com/emilk/egui.git", rev = "7bfaf4963676d02a88000b900b46365a827e0b65" } # egui master 2023-11-19 + +# Useful while developing: +# ecolor = { path = "../../egui/crates/ecolor" } +# eframe = { path = "../../egui/crates/eframe" } +# egui = { path = "../../egui/crates/egui" } +# egui_extras = { path = "../../egui/crates/egui_extras" } +# egui-wgpu = { path = "../../egui/crates/egui-wgpu" } +# emath = { path = "../../egui/crates/emath" } +# epaint = { path = "../../egui/crates/epaint" } + +# puffin = { path = "../../embark/puffin/puffin" } From 1826ef232d92ddb23a714ccaddda4d90bcaaea98 Mon Sep 17 00:00:00 2001 From: Antoine Beyeler Date: Mon, 20 Nov 2023 11:22:21 +0100 Subject: [PATCH 14/15] Fixed deadlock due to the use of `egui_ctx` from within a `egui_ctx.input()` closure --- crates/re_space_view_spatial/src/eye.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/re_space_view_spatial/src/eye.rs b/crates/re_space_view_spatial/src/eye.rs index a3119e72a68a..8955c67b08df 100644 --- a/crates/re_space_view_spatial/src/eye.rs +++ b/crates/re_space_view_spatial/src/eye.rs @@ -371,6 +371,8 @@ impl OrbitEye { return; // e.g. we're typing in a TextField } + let os = egui_ctx.os(); + let requires_repaint = egui_ctx.input(|input| { let dt = input.stable_dt.at_most(0.1); @@ -390,10 +392,7 @@ impl OrbitEye { } else { 1.0 }) - * (if input - .modifiers - .contains(RuntimeModifiers::slow_down(&egui_ctx.os())) - { + * (if input.modifiers.contains(RuntimeModifiers::slow_down(&os)) { 0.1 } else { 1.0 From 08de05094a0b6429c7f7813dbad1ce629e4ecb8a Mon Sep 17 00:00:00 2001 From: Antoine Beyeler Date: Mon, 20 Nov 2023 11:49:15 +0100 Subject: [PATCH 15/15] Restore auto-bounds after dragging the cursor --- .../src/space_view_class.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/re_space_view_time_series/src/space_view_class.rs b/crates/re_space_view_time_series/src/space_view_class.rs index d0c22dfe0c24..489d5dcc8ad0 100644 --- a/crates/re_space_view_time_series/src/space_view_class.rs +++ b/crates/re_space_view_time_series/src/space_view_class.rs @@ -14,8 +14,14 @@ use crate::view_part_system::{PlotSeriesKind, TimeSeriesSystem}; #[derive(Clone, Default)] pub struct TimeSeriesSpaceViewState { - /// track across frames when the user moves the time cursor + /// Is the user dragging the cursor this frame? is_dragging_time_cursor: bool, + + /// Was the user dragging the cursor last frame? + was_dragging_time_cursor: bool, + + /// State of egui_plot's auto bounds before the user started dragging the time cursor. + saved_auto_bounds: egui::Vec2b, } impl SpaceViewState for TimeSeriesSpaceViewState { @@ -216,11 +222,18 @@ impl SpaceViewClass for TimeSeriesSpaceView { } if state.is_dragging_time_cursor { + if !state.was_dragging_time_cursor { + state.saved_auto_bounds = plot_ui.auto_bounds(); + } // Freeze any change to the plot boundaries to avoid weird interaction with the time // cursor. plot_ui.set_plot_bounds(plot_ui.plot_bounds()); + } else if state.was_dragging_time_cursor { + plot_ui.set_auto_bounds(state.saved_auto_bounds); } + state.was_dragging_time_cursor = state.is_dragging_time_cursor; + // decide if the time cursor should be displayed, and if where current_time .map(|current_time| (current_time - time_offset) as f64)