Disable Vello renderer checkbox in preferences if browser doesn't support WebGPU (#1844)

* Disable vello checkbox if no wgpu support is available

* Fix compile error

* Check wgpu status on every diagogue open

* Execute graph on settings change

* Remove tooltip and disabled status from settings category

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Dennis Kobert
2024-07-23 16:19:44 -07:00
committed by GitHub
co-authored by Keavon Chambers
parent 0893ac49a6
commit fad289804a
7 changed files with 39 additions and 18 deletions
@@ -14,9 +14,13 @@ impl PreferencesMessageHandler {
pub fn editor_preferences(&self) -> EditorPreferences {
EditorPreferences {
imaginate_hostname: self.imaginate_server_hostname.clone(),
use_vello: self.use_vello,
use_vello: self.use_vello && self.supports_wgpu(),
}
}
pub fn supports_wgpu(&self) -> bool {
graph_craft::wasm_application_io::wgpu_available().unwrap_or_default()
}
}
impl Default for PreferencesMessageHandler {