mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 13:08:12 +08:00
Refactor document node type lookup function to fix performance degradation over time (#1878)
* Refactor document_node_types function * Fix node introspection * Implement diff based type updates * Fix missing monitor nodes * Improve docs and fix warings * Fix wrongful removal of node paths * Remove code examples for non pub methodsü * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
06a409f1c5
commit
0dfddd529b
@@ -103,13 +103,13 @@ impl WasmApplicationIo {
|
||||
ids: AtomicU64::new(0),
|
||||
#[cfg(feature = "wgpu")]
|
||||
gpu_executor: executor,
|
||||
windows: Vec::new().into(),
|
||||
windows: Vec::new(),
|
||||
resources: HashMap::new(),
|
||||
};
|
||||
#[cfg(not(feature = "ci"))]
|
||||
let window = io.create_window();
|
||||
#[cfg(not(feature = "ci"))]
|
||||
io.windows.push(WindowWrapper { window });
|
||||
if cfg!(target_arch = "wasm32") {
|
||||
let window = io.create_window();
|
||||
io.windows.push(WindowWrapper { window });
|
||||
}
|
||||
|
||||
io.resources.insert("null".to_string(), Arc::from(include_bytes!("null.png").to_vec()));
|
||||
io
|
||||
@@ -267,7 +267,7 @@ impl ApplicationIo for WasmApplicationIo {
|
||||
}
|
||||
|
||||
fn window(&self) -> Option<SurfaceHandle<Self::Surface>> {
|
||||
self.windows.iter().next().map(|wrapper| wrapper.window.clone())
|
||||
self.windows.first().map(|wrapper| wrapper.window.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user