debug: Add image support and gpu vendor logos
This commit is contained in:
parent
cd5c185440
commit
1de4b97bca
11 changed files with 541 additions and 71 deletions
390
Cargo.lock
generated
390
Cargo.lock
generated
|
|
@ -84,6 +84,24 @@ version = "1.5.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "983cd8b9d4b02a6dc6ffa557262eb5858a27a0038ffffe21a0f133eaa819a164"
|
checksum = "983cd8b9d4b02a6dc6ffa557262eb5858a27a0038ffffe21a0f133eaa819a164"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arrayref"
|
||||||
|
version = "0.3.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arrayvec"
|
||||||
|
version = "0.5.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arrayvec"
|
||||||
|
version = "0.7.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "atomic_refcell"
|
name = "atomic_refcell"
|
||||||
version = "0.1.8"
|
version = "0.1.8"
|
||||||
|
|
@ -176,13 +194,19 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "calloop"
|
name = "byteorder"
|
||||||
version = "0.10.2"
|
version = "1.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "595eb0438b3c6d262395fe30e6de9a61beb57ea56290b00a07f227fe6e20cbf2"
|
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "calloop"
|
||||||
|
version = "0.10.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5bcf530afb40e45e14440701e5e996d7fd139e84a912a4d83a8d6a0fb3e58663"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"nix 0.24.2",
|
"nix 0.25.0",
|
||||||
"slotmap",
|
"slotmap",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"vec_map",
|
"vec_map",
|
||||||
|
|
@ -241,6 +265,12 @@ dependencies = [
|
||||||
"objc",
|
"objc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "color_quant"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "core-foundation"
|
name = "core-foundation"
|
||||||
version = "0.9.3"
|
version = "0.9.3"
|
||||||
|
|
@ -418,10 +448,19 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "digest"
|
name = "data-url"
|
||||||
version = "0.10.5"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c"
|
checksum = "3a30bfce702bcfa94e906ef82421f2c0e61c076ad76030c16ee5d2e9a32fe193"
|
||||||
|
dependencies = [
|
||||||
|
"matches",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "digest"
|
||||||
|
version = "0.10.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"block-buffer",
|
"block-buffer",
|
||||||
"crypto-common",
|
"crypto-common",
|
||||||
|
|
@ -545,6 +584,18 @@ dependencies = [
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "egui_extras"
|
||||||
|
version = "0.19.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f698f685bb0ad39e87109e2f695ded0bccde77d5d40bbf7590cb5561c1e3039d"
|
||||||
|
dependencies = [
|
||||||
|
"egui",
|
||||||
|
"resvg",
|
||||||
|
"tiny-skia",
|
||||||
|
"usvg",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "egui_glow"
|
name = "egui_glow"
|
||||||
version = "0.19.0"
|
version = "0.19.0"
|
||||||
|
|
@ -624,12 +675,39 @@ dependencies = [
|
||||||
"miniz_oxide 0.5.4",
|
"miniz_oxide 0.5.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "float-cmp"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fnv"
|
name = "fnv"
|
||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fontconfig-parser"
|
||||||
|
version = "0.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2be17a530a842f8a7a60f4397a08e8f08872849a5e31b20c7bd7301dac483296"
|
||||||
|
dependencies = [
|
||||||
|
"roxmltree 0.15.1",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fontdb"
|
||||||
|
version = "0.9.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d52186a39c335aa6f79fc0bf1c3cf854870b6ad4e50a7bb8a59b4ba1331f478a"
|
||||||
|
dependencies = [
|
||||||
|
"fontconfig-parser",
|
||||||
|
"log",
|
||||||
|
"memmap2",
|
||||||
|
"ttf-parser 0.17.1",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "foreign-types"
|
name = "foreign-types"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
|
|
@ -698,6 +776,16 @@ dependencies = [
|
||||||
"wasi",
|
"wasi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gif"
|
||||||
|
version = "0.11.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06"
|
||||||
|
dependencies = [
|
||||||
|
"color_quant",
|
||||||
|
"weezl",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gimli"
|
name = "gimli"
|
||||||
version = "0.26.2"
|
version = "0.26.2"
|
||||||
|
|
@ -767,10 +855,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "image"
|
||||||
version = "1.9.1"
|
version = "0.24.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
|
checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
"byteorder",
|
||||||
|
"color_quant",
|
||||||
|
"num-rational",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "indexmap"
|
||||||
|
version = "1.9.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
|
|
@ -831,6 +932,12 @@ version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jpeg-decoder"
|
||||||
|
version = "0.2.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9478aa10f73e7528198d75109c8be5cd7d15fb530238040148d5f9a22d4c5b3b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.60"
|
version = "0.3.60"
|
||||||
|
|
@ -846,6 +953,15 @@ version = "3.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
|
checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "kurbo"
|
||||||
|
version = "0.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7a53776d271cfb873b17c618af0298445c88afc52837f3e948fa3fafd131f449"
|
||||||
|
dependencies = [
|
||||||
|
"arrayvec 0.7.2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
|
|
@ -946,6 +1062,12 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "matches"
|
||||||
|
version = "0.1.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
version = "2.5.0"
|
version = "2.5.0"
|
||||||
|
|
@ -1118,6 +1240,27 @@ dependencies = [
|
||||||
"minimal-lexical",
|
"minimal-lexical",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-integer"
|
||||||
|
version = "0.1.45"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-rational"
|
||||||
|
version = "0.4.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"num-integer",
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.15"
|
version = "0.2.15"
|
||||||
|
|
@ -1187,7 +1330,7 @@ version = "0.17.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "18904d3c65493a9f0d7542293d1a7f69bfdc309a6b9ef4f46dc3e58b0577edc5"
|
checksum = "18904d3c65493a9f0d7542293d1a7f69bfdc309a6b9ef4f46dc3e58b0577edc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ttf-parser",
|
"ttf-parser 0.17.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1219,6 +1362,12 @@ version = "2.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pico-args"
|
||||||
|
version = "0.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project-lite"
|
name = "pin-project-lite"
|
||||||
version = "0.2.9"
|
version = "0.2.9"
|
||||||
|
|
@ -1335,6 +1484,12 @@ dependencies = [
|
||||||
"cty",
|
"cty",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rctree"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9ae028b272a6e99d9f8260ceefa3caa09300a8d6c8d2b2001316474bc52122e9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "redox_syscall"
|
name = "redox_syscall"
|
||||||
version = "0.2.16"
|
version = "0.2.16"
|
||||||
|
|
@ -1381,6 +1536,33 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "resvg"
|
||||||
|
version = "0.23.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34489194784b86c03c3d688258e2ba73f3c82700ba4673ee2ecad5ae540b9438"
|
||||||
|
dependencies = [
|
||||||
|
"gif",
|
||||||
|
"jpeg-decoder",
|
||||||
|
"log",
|
||||||
|
"pico-args",
|
||||||
|
"png",
|
||||||
|
"rgb",
|
||||||
|
"svgfilters",
|
||||||
|
"svgtypes",
|
||||||
|
"tiny-skia",
|
||||||
|
"usvg",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rgb"
|
||||||
|
version = "0.8.34"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3603b7d71ca82644f79b5a06d1220e9a58ede60bd32255f698cb1af8838b8db3"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ron"
|
name = "ron"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
|
|
@ -1392,6 +1574,24 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "roxmltree"
|
||||||
|
version = "0.14.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "921904a62e410e37e215c40381b7117f830d9d89ba60ab5236170541dd25646b"
|
||||||
|
dependencies = [
|
||||||
|
"xmlparser",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "roxmltree"
|
||||||
|
version = "0.15.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6b9de9831a129b122e7e61f242db509fa9d0838008bf0b29bb0624669edfe48a"
|
||||||
|
dependencies = [
|
||||||
|
"xmlparser",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc-demangle"
|
name = "rustc-demangle"
|
||||||
version = "0.1.21"
|
version = "0.1.21"
|
||||||
|
|
@ -1404,12 +1604,37 @@ version = "1.0.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
|
checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustybuzz"
|
||||||
|
version = "0.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a617c811f5c9a7060fe511d35d13bf5b9f0463ce36d63ce666d05779df2b4eba"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
"bytemuck",
|
||||||
|
"smallvec",
|
||||||
|
"ttf-parser 0.15.2",
|
||||||
|
"unicode-bidi-mirroring",
|
||||||
|
"unicode-ccc",
|
||||||
|
"unicode-general-category",
|
||||||
|
"unicode-script",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.11"
|
version = "1.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
|
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "safe_arch"
|
||||||
|
version = "0.5.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05"
|
||||||
|
dependencies = [
|
||||||
|
"bytemuck",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scan_fmt"
|
name = "scan_fmt"
|
||||||
version = "0.2.6"
|
version = "0.2.6"
|
||||||
|
|
@ -1459,9 +1684,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.87"
|
version = "1.0.88"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
|
checksum = "8e8b3801309262e8184d9687fb697586833e939767aea0dda89f5a8e650e8bd7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"ryu",
|
"ryu",
|
||||||
|
|
@ -1479,6 +1704,21 @@ dependencies = [
|
||||||
"digest",
|
"digest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "simplecss"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d"
|
||||||
|
dependencies = [
|
||||||
|
"log",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "siphasher"
|
||||||
|
version = "0.3.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slog"
|
name = "slog"
|
||||||
version = "2.7.0"
|
version = "2.7.0"
|
||||||
|
|
@ -1615,11 +1855,13 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smithay-egui"
|
name = "smithay-egui"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/Smithay/smithay-egui.git?rev=7334d0c53#7334d0c533ad307b3359cd4931bfb1ad4c34b178"
|
source = "git+https://github.com/Smithay/smithay-egui.git?branch=feature/image#9fcb589d5c99ac8143f0a967504cdbf691d6cea4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cgmath",
|
"cgmath",
|
||||||
"egui",
|
"egui",
|
||||||
|
"egui_extras",
|
||||||
"egui_glow",
|
"egui_glow",
|
||||||
|
"image",
|
||||||
"memoffset",
|
"memoffset",
|
||||||
"smithay",
|
"smithay",
|
||||||
"xkbcommon 0.4.1",
|
"xkbcommon 0.4.1",
|
||||||
|
|
@ -1643,6 +1885,25 @@ version = "2.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "svgfilters"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "639abcebc15fdc2df179f37d6f5463d660c1c79cd552c12343a4600827a04bce"
|
||||||
|
dependencies = [
|
||||||
|
"float-cmp",
|
||||||
|
"rgb",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "svgtypes"
|
||||||
|
version = "0.8.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "22975e8a2bac6a76bb54f898a6b18764633b00e780330f0b689f65afb3975564"
|
||||||
|
dependencies = [
|
||||||
|
"siphasher",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.103"
|
version = "1.0.103"
|
||||||
|
|
@ -1743,6 +2004,20 @@ dependencies = [
|
||||||
"time-core",
|
"time-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tiny-skia"
|
||||||
|
version = "0.6.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d049bfef0eaa2521e75d9ffb5ce86ad54480932ae19b85f78bec6f52c4d30d78"
|
||||||
|
dependencies = [
|
||||||
|
"arrayref",
|
||||||
|
"arrayvec 0.5.2",
|
||||||
|
"bytemuck",
|
||||||
|
"cfg-if",
|
||||||
|
"png",
|
||||||
|
"safe_arch",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.5.9"
|
version = "0.5.9"
|
||||||
|
|
@ -1772,6 +2047,12 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ttf-parser"
|
||||||
|
version = "0.15.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttf-parser"
|
name = "ttf-parser"
|
||||||
version = "0.17.1"
|
version = "0.17.1"
|
||||||
|
|
@ -1795,12 +2076,75 @@ dependencies = [
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-bidi"
|
||||||
|
version = "0.3.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-bidi-mirroring"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ccc"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-general-category"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "07547e3ee45e28326cc23faac56d44f58f16ab23e413db526debce3b0bfd2742"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.4"
|
version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
|
checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-script"
|
||||||
|
version = "0.5.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-vo"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "usvg"
|
||||||
|
version = "0.23.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "28a82565b5c96dcbb58c9bdbb6aa3642abd395a6a6b480658532c6f74c3c4b7a"
|
||||||
|
dependencies = [
|
||||||
|
"base64",
|
||||||
|
"data-url",
|
||||||
|
"flate2",
|
||||||
|
"float-cmp",
|
||||||
|
"fontdb",
|
||||||
|
"kurbo",
|
||||||
|
"log",
|
||||||
|
"pico-args",
|
||||||
|
"rctree",
|
||||||
|
"roxmltree 0.14.1",
|
||||||
|
"rustybuzz",
|
||||||
|
"simplecss",
|
||||||
|
"siphasher",
|
||||||
|
"svgtypes",
|
||||||
|
"ttf-parser 0.15.2",
|
||||||
|
"unicode-bidi",
|
||||||
|
"unicode-script",
|
||||||
|
"unicode-vo",
|
||||||
|
"xmlwriter",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "0.8.2"
|
version = "0.8.2"
|
||||||
|
|
@ -2068,6 +2412,12 @@ dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "weezl"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.3.9"
|
version = "0.3.9"
|
||||||
|
|
@ -2306,3 +2656,15 @@ name = "xml-rs"
|
||||||
version = "0.8.4"
|
version = "0.8.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
|
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xmlparser"
|
||||||
|
version = "0.13.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xmlwriter"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,9 @@ features = ["backend_drm", "backend_gbm", "backend_egl", "backend_libinput", "ba
|
||||||
|
|
||||||
[dependencies.smithay-egui]
|
[dependencies.smithay-egui]
|
||||||
git = "https://github.com/Smithay/smithay-egui.git"
|
git = "https://github.com/Smithay/smithay-egui.git"
|
||||||
rev = "7334d0c53"
|
#rev = "ee25d401ac"
|
||||||
|
branch = "feature/image"
|
||||||
|
features = ["svg"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
||||||
1
resources/icons/amd.svg
Normal file
1
resources/icons/amd.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M0 51.413v-12.57l17.938-17.938v25.137h25.137l-17.938 17.94H0zm55.25 3.343l-8.673-8.674v-28.6h-28.6L.512.018h63.452l.007 31.412.026 31.576a.78.78 0 0 1-.027.294c-.034.096-2.3-2.123-8.72-8.543z" fill="#00a774"/></svg>
|
||||||
|
After Width: | Height: | Size: 287 B |
12
resources/icons/intel.svg
Normal file
12
resources/icons/intel.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 395.4 155.9" style="enable-background:new 0 0 395.4 155.9;" xml:space="preserve" sodipodi:docname="Intel_logo_(2020,_dark_blue).svg" inkscape:version="1.1.2 (b8e25be8, 2022-02-05)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs1066"/><sodipodi:namedview id="namedview1064" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="0.86470488" inkscape:cx="164.21788" inkscape:cy="-98.299434" inkscape:window-width="1701" inkscape:window-height="742" inkscape:window-x="0" inkscape:window-y="25" inkscape:window-maximized="0" inkscape:current-layer="Layer_1"/>
|
||||||
|
<style type="text/css" id="style1053">
|
||||||
|
.st0{fill:#0068B5;}
|
||||||
|
</style>
|
||||||
|
<rect x="4.7" y="5.2" class="st0" width="28.1" height="28.1" id="rect1055" style="fill:#00c7fd;fill-opacity:1"/>
|
||||||
|
<g id="g1061">
|
||||||
|
<path d="M32.1,151.6V50.4H5.5v101.2H32.1z M208.9,152.6v-24.8c-3.9,0-7.2-0.2-9.6-0.6c-2.8-0.4-4.9-1.4-6.3-2.8 c-1.4-1.4-2.3-3.4-2.8-6c-0.4-2.5-0.6-5.8-0.6-9.8V73.2h19.3V50.4h-19.3V10.9h-26.7v97.9c0,8.3,0.7,15.3,2.1,20.9 c1.4,5.5,3.8,10,7.1,13.4s7.7,5.8,13,7.3c5.4,1.5,12.2,2.2,20.3,2.2L208.9,152.6L208.9,152.6z M361.7,151.6V3.1H335v148.5H361.7z M137.2,60.3c-7.4-8-17.8-12-31-12c-6.4,0-12.2,1.3-17.5,3.9C83.5,54.8,79,58.4,75.5,63L74,64.9v-1.7V50.4H47.7v101.2h26.5V97.7 v3.7c0-0.6,0-1.2,0-1.8c0.3-9.5,2.6-16.5,7-21c4.7-4.8,10.4-7.2,16.9-7.2c7.7,0,13.6,2.4,17.5,7c3.8,4.6,5.8,11.1,5.8,19.4l0,0V98 l0,0l0,0v53.5h26.9V94.1C148.4,79.7,144.6,68.3,137.2,60.3z M321.2,100.8c0-7.3-1.3-14.1-3.8-20.5c-2.6-6.3-6.2-11.9-10.7-16.7 c-4.6-4.8-10.1-8.5-16.5-11.2s-13.5-4-21.2-4c-7.3,0-14.2,1.4-20.6,4.1c-6.4,2.8-12,6.5-16.7,11.2s-8.5,10.3-11.2,16.7 c-2.8,6.4-4.1,13.3-4.1,20.6c0,7.3,1.3,14.2,3.9,20.6c2.6,6.4,6.3,12,10.9,16.7c4.6,4.7,10.3,8.5,16.9,11.2 c6.6,2.8,13.9,4.2,21.7,4.2c22.6,0,36.6-10.3,45-19.9l-19.2-14.6c-4,4.8-13.6,11.3-25.6,11.3c-7.5,0-13.7-1.7-18.4-5.2 c-4.7-3.4-7.9-8.2-9.6-14.1l-0.3-0.9h79.5L321.2,100.8L321.2,100.8z M241.9,91.5c0-7.4,8.5-20.3,26.8-20.4 c18.3,0,26.9,12.9,26.9,20.3L241.9,91.5z" id="path1057" style="fill:#0068b5;fill-opacity:1"/>
|
||||||
|
<path d="M392.1,138.4c-0.5-1.2-1.2-2.2-2.1-3.1c-0.9-0.9-1.9-1.6-3.1-2.1s-2.5-0.8-3.8-0.8c-1.4,0-2.6,0.3-3.8,0.8 c-1.2,0.5-2.2,1.2-3.1,2.1c-0.9,0.9-1.6,1.9-2.1,3.1c-0.5,1.2-0.8,2.5-0.8,3.8c0,1.4,0.3,2.6,0.8,3.8s1.2,2.2,2.1,3.1 c0.9,0.9,1.9,1.6,3.1,2.1s2.5,0.8,3.8,0.8c1.4,0,2.6-0.3,3.8-0.8c1.2-0.5,2.2-1.2,3.1-2.1c0.9-0.9,1.6-1.9,2.1-3.1 c0.5-1.2,0.8-2.5,0.8-3.8S392.6,139.6,392.1,138.4z M390.5,145.4c-0.4,1-1,1.9-1.7,2.6c-0.7,0.7-1.6,1.3-2.6,1.7s-2,0.6-3.2,0.6 c-1.1,0-2.2-0.2-3.2-0.6c-1-0.4-1.9-1-2.6-1.7s-1.3-1.6-1.7-2.6c-0.4-1-0.6-2-0.6-3.2c0-1.1,0.2-2.2,0.6-3.2s1-1.9,1.7-2.6 c0.7-0.7,1.6-1.3,2.6-1.7s2-0.6,3.2-0.6c1.1,0,2.2,0.2,3.2,0.6c1,0.4,1.9,1,2.6,1.7s1.3,1.6,1.7,2.6c0.4,1,0.6,2,0.6,3.2 C391.2,143.4,390.9,144.4,390.5,145.4z M384.9,143c0.8-0.1,1.4-0.4,1.9-0.9s0.8-1.2,0.8-2.2c0-1.1-0.3-1.9-1-2.5 c-0.6-0.6-1.7-0.9-3-0.9h-4.4v11.3h2.1v-4.6h1.5l2.8,4.6h2.2L384.9,143z M383.8,141.4c-0.3,0-0.6,0-1,0h-1.5v-3.2h1.5 c0.3,0,0.6,0,1,0c0.3,0,0.6,0.1,0.9,0.2c0.3,0.1,0.5,0.3,0.6,0.5s0.2,0.5,0.2,0.9s-0.1,0.7-0.2,0.9c-0.2,0.2-0.4,0.4-0.6,0.5 C384.4,141.3,384.1,141.4,383.8,141.4z" id="path1059" style="fill:#0068b5;fill-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.6 KiB |
1
resources/icons/nvidia.svg
Normal file
1
resources/icons/nvidia.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M23.862 23.46v-3.816l1.13-.047c10.46-.33 17.313 8.998 17.313 8.998s-7.396 10.27-15.335 10.27a9.73 9.73 0 0 1-3.086-.495v-11.59c4.075.495 4.9 2.285 7.326 6.36l5.44-4.57s-3.98-5.206-10.67-5.206c-.707-.024-1.413.024-2.12.094m0-12.626v5.7l1.13-.07c14.534-.495 24.026 11.92 24.026 11.92S38.136 41.622 26.806 41.622c-.99 0-1.955-.094-2.92-.26v3.533c.8.094 1.625.165 2.426.165 10.553 0 18.185-5.394 25.58-11.754 1.225.99 6.242 3.368 7.28 4.405-7.02 5.89-23.39 10.623-32.67 10.623a23.24 23.24 0 0 1-2.591-.141v4.97H64v-42.33zm0 27.536v3.015C14.1 39.644 11.4 29.49 11.4 29.49s4.688-5.182 12.46-6.03v3.298h-.024c-4.075-.495-7.28 3.32-7.28 3.32s1.814 6.43 7.302 8.29M6.548 29.067s5.77-8.527 17.337-9.422v-3.11C11.07 17.572 0 28.408 0 28.408s6.266 18.138 23.862 19.787v-3.298c-12.908-1.602-17.313-15.83-17.313-15.83z" fill="#76b900"/></svg>
|
||||||
|
After Width: | Height: | Size: 900 B |
|
|
@ -504,22 +504,32 @@ impl State {
|
||||||
let outputs = device.enumerate_surfaces()?.added; // There are no removed outputs on newly added devices
|
let outputs = device.enumerate_surfaces()?.added; // There are no removed outputs on newly added devices
|
||||||
let mut wl_outputs = Vec::new();
|
let mut wl_outputs = Vec::new();
|
||||||
let mut w = self.common.shell.global_space().size.w;
|
let mut w = self.common.shell.global_space().size.w;
|
||||||
for (crtc, conn) in outputs {
|
{
|
||||||
match device.setup_surface(crtc, conn, (w, 0)) {
|
let backend = self.backend.kms();
|
||||||
Ok(output) => {
|
for (crtc, conn) in outputs {
|
||||||
w += output
|
let mut renderer = match backend.api.renderer(&render_node, &render_node) {
|
||||||
.user_data()
|
Ok(renderer) => renderer,
|
||||||
.get::<RefCell<OutputConfig>>()
|
Err(err) => {
|
||||||
.unwrap()
|
slog_scope::warn!("Failed to initialize output: {}", err);
|
||||||
.borrow()
|
continue;
|
||||||
.mode_size()
|
}
|
||||||
.w;
|
};
|
||||||
wl_outputs.push(output);
|
match device.setup_surface(crtc, conn, (w, 0), &mut renderer) {
|
||||||
}
|
Ok(output) => {
|
||||||
Err(err) => slog_scope::warn!("Failed to initialize output: {}", err),
|
w += output
|
||||||
};
|
.user_data()
|
||||||
|
.get::<RefCell<OutputConfig>>()
|
||||||
|
.unwrap()
|
||||||
|
.borrow()
|
||||||
|
.mode_size()
|
||||||
|
.w;
|
||||||
|
wl_outputs.push(output);
|
||||||
|
}
|
||||||
|
Err(err) => slog_scope::warn!("Failed to initialize output: {}", err),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
backend.devices.insert(drm_node, device);
|
||||||
}
|
}
|
||||||
self.backend.kms().devices.insert(drm_node, device);
|
|
||||||
|
|
||||||
self.common
|
self.common
|
||||||
.output_configuration_state
|
.output_configuration_state
|
||||||
|
|
@ -542,32 +552,45 @@ impl State {
|
||||||
let drm_node = DrmNode::from_dev_id(dev)?;
|
let drm_node = DrmNode::from_dev_id(dev)?;
|
||||||
let mut outputs_removed = Vec::new();
|
let mut outputs_removed = Vec::new();
|
||||||
let mut outputs_added = Vec::new();
|
let mut outputs_added = Vec::new();
|
||||||
if let Some(device) = self.backend.kms().devices.get_mut(&drm_node) {
|
{
|
||||||
let changes = device.enumerate_surfaces()?;
|
let backend = self.backend.kms();
|
||||||
let mut w = self.common.shell.global_space().size.w;
|
if let Some(device) = backend.devices.get_mut(&drm_node) {
|
||||||
for crtc in changes.removed {
|
let changes = device.enumerate_surfaces()?;
|
||||||
if let Some(surface) = device.surfaces.remove(&crtc) {
|
let mut w = self.common.shell.global_space().size.w;
|
||||||
if let Some(token) = surface.render_timer_token {
|
for crtc in changes.removed {
|
||||||
self.common.event_loop_handle.remove(token);
|
if let Some(surface) = device.surfaces.remove(&crtc) {
|
||||||
|
if let Some(token) = surface.render_timer_token {
|
||||||
|
self.common.event_loop_handle.remove(token);
|
||||||
|
}
|
||||||
|
w -= surface.output.current_mode().map(|m| m.size.w).unwrap_or(0);
|
||||||
|
outputs_removed.push(surface.output.clone());
|
||||||
}
|
}
|
||||||
w -= surface.output.current_mode().map(|m| m.size.w).unwrap_or(0);
|
|
||||||
outputs_removed.push(surface.output.clone());
|
|
||||||
}
|
}
|
||||||
}
|
for (crtc, conn) in changes.added {
|
||||||
for (crtc, conn) in changes.added {
|
let mut renderer = match backend
|
||||||
match device.setup_surface(crtc, conn, (w, 0)) {
|
.api
|
||||||
Ok(output) => {
|
.renderer(&device.render_node, &device.render_node)
|
||||||
w += output
|
{
|
||||||
.user_data()
|
Ok(renderer) => renderer,
|
||||||
.get::<RefCell<OutputConfig>>()
|
Err(err) => {
|
||||||
.unwrap()
|
slog_scope::warn!("Failed to initialize output: {}", err);
|
||||||
.borrow()
|
continue;
|
||||||
.mode_size()
|
}
|
||||||
.w;
|
};
|
||||||
outputs_added.push(output);
|
match device.setup_surface(crtc, conn, (w, 0), &mut renderer) {
|
||||||
}
|
Ok(output) => {
|
||||||
Err(err) => slog_scope::warn!("Failed to initialize output: {}", err),
|
w += output
|
||||||
};
|
.user_data()
|
||||||
|
.get::<RefCell<OutputConfig>>()
|
||||||
|
.unwrap()
|
||||||
|
.borrow()
|
||||||
|
.mode_size()
|
||||||
|
.w;
|
||||||
|
outputs_added.push(output);
|
||||||
|
}
|
||||||
|
Err(err) => slog_scope::warn!("Failed to initialize output: {}", err),
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -671,6 +694,7 @@ impl Device {
|
||||||
crtc: crtc::Handle,
|
crtc: crtc::Handle,
|
||||||
conn: connector::Handle,
|
conn: connector::Handle,
|
||||||
position: (i32, i32),
|
position: (i32, i32),
|
||||||
|
renderer: &mut GlMultiRenderer<'_>,
|
||||||
) -> Result<Output> {
|
) -> Result<Output> {
|
||||||
let drm = &mut *self.drm.as_source_mut();
|
let drm = &mut *self.drm.as_source_mut();
|
||||||
let crtc_info = drm.get_crtc(crtc)?;
|
let crtc_info = drm.get_crtc(crtc)?;
|
||||||
|
|
@ -745,7 +769,7 @@ impl Device {
|
||||||
dirty: false,
|
dirty: false,
|
||||||
render_timer_token: None,
|
render_timer_token: None,
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
fps: Fps::default(),
|
fps: Fps::new(renderer.as_mut()),
|
||||||
};
|
};
|
||||||
self.surfaces.insert(crtc, data);
|
self.surfaces.insert(crtc, data);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "debug")]
|
||||||
impl<R> From<TextureRenderElement<Gles2Texture>> for CosmicElement<R>
|
impl<R> From<TextureRenderElement<Gles2Texture>> for CosmicElement<R>
|
||||||
where
|
where
|
||||||
R: Renderer + ImportAll + AsGlowRenderer,
|
R: Renderer + ImportAll + AsGlowRenderer,
|
||||||
|
|
|
||||||
|
|
@ -221,13 +221,16 @@ pub fn init_backend(
|
||||||
.map_err(|_| anyhow::anyhow!("Failed to init eventloop timer for winit"))?;
|
.map_err(|_| anyhow::anyhow!("Failed to init eventloop timer for winit"))?;
|
||||||
event_ping.ping();
|
event_ping.ping();
|
||||||
|
|
||||||
|
#[cfg(feature = "debug")]
|
||||||
|
let fps = Fps::new(backend.renderer());
|
||||||
|
|
||||||
state.backend = BackendData::Winit(WinitState {
|
state.backend = BackendData::Winit(WinitState {
|
||||||
backend,
|
backend,
|
||||||
output: output.clone(),
|
output: output.clone(),
|
||||||
damage_tracker: DamageTrackedRenderer::from_output(&output),
|
damage_tracker: DamageTrackedRenderer::from_output(&output),
|
||||||
screencopy: Vec::new(),
|
screencopy: Vec::new(),
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
fps: Fps::default(),
|
fps,
|
||||||
});
|
});
|
||||||
state
|
state
|
||||||
.common
|
.common
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ impl X11State {
|
||||||
pending: true,
|
pending: true,
|
||||||
screencopy: Vec::new(),
|
screencopy: Vec::new(),
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
fps: Fps::default(),
|
fps: Fps::new(&mut self.renderer),
|
||||||
});
|
});
|
||||||
|
|
||||||
// schedule first render
|
// schedule first render
|
||||||
|
|
|
||||||
50
src/debug.rs
50
src/debug.rs
|
|
@ -1,7 +1,9 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::state::{Common, Fps};
|
use crate::state::{Common, Fps};
|
||||||
use egui::Color32;
|
use egui::{Color32, Vec2};
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
drm::DrmNode,
|
drm::DrmNode,
|
||||||
|
|
@ -29,7 +31,7 @@ pub fn fps_ui(
|
||||||
area: Rectangle<i32, Logical>,
|
area: Rectangle<i32, Logical>,
|
||||||
scale: f64,
|
scale: f64,
|
||||||
) -> Result<TextureRenderElement<Gles2Texture>, Gles2Error> {
|
) -> Result<TextureRenderElement<Gles2Texture>, Gles2Error> {
|
||||||
use egui::widgets::plot::{Bar, BarChart, HLine, Legend, Plot};
|
use egui::widgets::plot::{Bar, BarChart, Legend, Plot};
|
||||||
|
|
||||||
let (max, min, avg, avg_fps) = (
|
let (max, min, avg, avg_fps) = (
|
||||||
fps.max_frametime().as_secs_f64(),
|
fps.max_frametime().as_secs_f64(),
|
||||||
|
|
@ -84,6 +86,33 @@ pub fn fps_ui(
|
||||||
})
|
})
|
||||||
.unzip();
|
.unzip();
|
||||||
|
|
||||||
|
let vendors = HashMap::from([
|
||||||
|
(
|
||||||
|
"0x10de",
|
||||||
|
fps.state
|
||||||
|
.with_image(renderer, "nvidia", |image, ctx| {
|
||||||
|
(image.texture_id(ctx), image.size_vec2())
|
||||||
|
})
|
||||||
|
.expect("Logo images not loaded?"),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"0x1002",
|
||||||
|
fps.state
|
||||||
|
.with_image(renderer, "amd", |image, ctx| {
|
||||||
|
(image.texture_id(ctx), image.size_vec2())
|
||||||
|
})
|
||||||
|
.expect("Logo images not loaded?"),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"0x8086",
|
||||||
|
fps.state
|
||||||
|
.with_image(renderer, "intel", |image, ctx| {
|
||||||
|
(image.texture_id(ctx), image.size_vec2())
|
||||||
|
})
|
||||||
|
.expect("Logo images not loaded?"),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
|
||||||
fps.state.render(
|
fps.state.render(
|
||||||
|ctx| {
|
|ctx| {
|
||||||
egui::Area::new("main")
|
egui::Area::new("main")
|
||||||
|
|
@ -104,7 +133,22 @@ pub fn fps_ui(
|
||||||
ui.separator();
|
ui.separator();
|
||||||
|
|
||||||
if let Some(gpu) = gpu {
|
if let Some(gpu) = gpu {
|
||||||
ui.label(egui::RichText::new(format!("renderD{}", gpu.minor())).code());
|
ui.horizontal(|ui| {
|
||||||
|
let resp = ui.label(
|
||||||
|
egui::RichText::new(format!("renderD{}", gpu.minor())).code(),
|
||||||
|
);
|
||||||
|
if let Ok(vendor) = std::fs::read_to_string(format!(
|
||||||
|
"/sys/class/drm/renderD{}/device/vendor",
|
||||||
|
gpu.minor()
|
||||||
|
)) {
|
||||||
|
if let Some((texture_id, mut size)) = vendors.get(vendor.trim())
|
||||||
|
{
|
||||||
|
let factor = resp.rect.height() / size.y;
|
||||||
|
size = Vec2::from([size.x * factor, resp.rect.height()]);
|
||||||
|
ui.image(*texture_id, size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
ui.label(egui::RichText::new(format!("FPS: {:>7.3}", avg_fps)).heading());
|
ui.label(egui::RichText::new(format!("FPS: {:>7.3}", avg_fps)).heading());
|
||||||
ui.label("Frame Times:");
|
ui.label("Frame Times:");
|
||||||
|
|
|
||||||
42
src/state.rs
42
src/state.rs
|
|
@ -14,6 +14,8 @@ use crate::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_manager_v1::CursorMode;
|
use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_manager_v1::CursorMode;
|
||||||
|
#[cfg(feature = "debug")]
|
||||||
|
use smithay::backend::renderer::glow::GlowRenderer;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
drm::DrmNode,
|
drm::DrmNode,
|
||||||
|
|
@ -465,6 +467,7 @@ pub struct Frame {
|
||||||
pub duration_displayed: Duration,
|
pub duration_displayed: Duration,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "debug")]
|
||||||
impl Frame {
|
impl Frame {
|
||||||
fn frame_time(&self) -> Duration {
|
fn frame_time(&self) -> Duration {
|
||||||
self.duration_elements
|
self.duration_elements
|
||||||
|
|
@ -480,6 +483,7 @@ impl Frame {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "debug")]
|
||||||
impl From<PendingFrame> for Frame {
|
impl From<PendingFrame> for Frame {
|
||||||
fn from(pending: PendingFrame) -> Self {
|
fn from(pending: PendingFrame) -> Self {
|
||||||
Frame {
|
Frame {
|
||||||
|
|
@ -541,7 +545,7 @@ impl Fps {
|
||||||
);
|
);
|
||||||
|
|
||||||
self.frames.push_back(frame.into());
|
self.frames.push_back(frame.into());
|
||||||
if self.frames.len() > Fps::WINDOW_SIZE {
|
while self.frames.len() > Fps::WINDOW_SIZE {
|
||||||
self.frames.pop_front();
|
self.frames.pop_front();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -601,18 +605,34 @@ impl Fps {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INTEL_LOGO: &'static [u8] = include_bytes!("../resources/icons/intel.svg");
|
||||||
|
static AMD_LOGO: &'static [u8] = include_bytes!("../resources/icons/amd.svg");
|
||||||
|
static NVIDIA_LOGO: &'static [u8] = include_bytes!("../resources/icons/nvidia.svg");
|
||||||
|
|
||||||
#[cfg(feature = "debug")]
|
#[cfg(feature = "debug")]
|
||||||
impl Default for Fps {
|
impl Fps {
|
||||||
fn default() -> Fps {
|
pub fn new(renderer: &mut GlowRenderer) -> Fps {
|
||||||
|
let state = {
|
||||||
|
let state =
|
||||||
|
smithay_egui::EguiState::new(Rectangle::from_loc_and_size((0, 0), (400, 800)));
|
||||||
|
let mut visuals: egui::style::Visuals = Default::default();
|
||||||
|
visuals.window_shadow.extrusion = 0.0;
|
||||||
|
state.context().set_visuals(visuals);
|
||||||
|
state
|
||||||
|
};
|
||||||
|
|
||||||
|
state
|
||||||
|
.load_svg(renderer, String::from("intel"), INTEL_LOGO)
|
||||||
|
.unwrap();
|
||||||
|
state
|
||||||
|
.load_svg(renderer, String::from("amd"), AMD_LOGO)
|
||||||
|
.unwrap();
|
||||||
|
state
|
||||||
|
.load_svg(renderer, String::from("nvidia"), NVIDIA_LOGO)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
Fps {
|
Fps {
|
||||||
state: {
|
state,
|
||||||
let state =
|
|
||||||
smithay_egui::EguiState::new(Rectangle::from_loc_and_size((0, 0), (400, 800)));
|
|
||||||
let mut visuals: egui::style::Visuals = Default::default();
|
|
||||||
visuals.window_shadow.extrusion = 0.0;
|
|
||||||
state.context().set_visuals(visuals);
|
|
||||||
state
|
|
||||||
},
|
|
||||||
pending_frame: None,
|
pending_frame: None,
|
||||||
frames: VecDeque::with_capacity(Fps::WINDOW_SIZE + 1),
|
frames: VecDeque::with_capacity(Fps::WINDOW_SIZE + 1),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue