1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Fix egui-wgpu performance regression (#3580)

Introduced in the recent multi-viewports work, we accidentally recreated
the wgpu surfaces every frame. This is now fixed.

I found this while improving the profiling of `eframe`
This commit is contained in:
Emil Ernerfeldt
2023-11-19 21:14:13 +01:00
committed by GitHub
parent 960b01b67a
commit 30ee478caf
14 changed files with 372 additions and 279 deletions

View File

@@ -2391,7 +2391,7 @@ impl Context {
/// [not_supported]: crate::load::LoadError::NotSupported
/// [custom]: crate::load::LoadError::Loading
pub fn try_load_bytes(&self, uri: &str) -> load::BytesLoadResult {
crate::profile_function!();
crate::profile_function!(uri);
let loaders = self.loaders();
let bytes_loaders = loaders.bytes.lock();
@@ -2428,7 +2428,7 @@ impl Context {
/// [not_supported]: crate::load::LoadError::NotSupported
/// [custom]: crate::load::LoadError::Loading
pub fn try_load_image(&self, uri: &str, size_hint: load::SizeHint) -> load::ImageLoadResult {
crate::profile_function!();
crate::profile_function!(uri);
let loaders = self.loaders();
let image_loaders = loaders.image.lock();
@@ -2471,7 +2471,7 @@ impl Context {
texture_options: TextureOptions,
size_hint: load::SizeHint,
) -> load::TextureLoadResult {
crate::profile_function!();
crate::profile_function!(uri);
let loaders = self.loaders();
let texture_loaders = loaders.texture.lock();